Git Product home page Git Product logo

Comments (6)

joan2937 avatar joan2937 commented on September 26, 2024

This certainly sounds like an error.

The pigpio daemon should notice the state change and send an update to the Python module. I wonder if it's because the Python module has no knowledge of the GPIO state until it's informed of the change so sees the first report as the initial state.

I'll have a look at how it works and get back to you.

from pigpio.

joan2937 avatar joan2937 commented on September 26, 2024

Okay. In the Python module the GPIO levels are defaulted to all LOW as far as callbacks are concerned. So the first transition to LOW will be missed.

I'll change the Python to default the levels to the current levels for the next release.

If you want to incorporate the change now edit pigpio.py and search for "Runs the notification thread" (without the quotes).

Change line

lastLevel = 0

to

lastLevel = _pigpio_command(self.control, _PI_CMD_BR1, 0, 0)

from pigpio.

rhowitt avatar rhowitt commented on September 26, 2024

Thank you for the quick response. I will try the patch.

Rick Howitt

From: joan2937 [mailto:[email protected]]
Sent: Friday, September 25, 2015 10:35 AM
To: joan2937/pigpio [email protected]
Cc: rhowitt
Subject: Re: [pigpio] Interrupt - Edge Falling - Problem (#25)

Okay. In the Python module the GPIO levels are defaulted to all LOW as far as callbacks are concerned. So the first transition to LOW will be missed.

I'll change the Python to default the levels to the current levels for the next release.

If you want to incorporate the change now edit pigpio.py and search for "Runs the notification thread" (without the quotes).

Change line

lastLevel = 0

to

lastLevel = _pigpio_command(self.control, _PI_CMD_BR1, 0, 0)


Reply to this email directly or view it on GitHub #25 (comment) . https://github.com/notifications/beacon/AFvTTlEz-LUNIPkPAgU4-Oi_zvwsM7emks5o1VMigaJpZM4GDzr2.gif

from pigpio.

joan2937 avatar joan2937 commented on September 26, 2024

Added to V38.

from pigpio.

rhowitt avatar rhowitt commented on September 26, 2024

New Problem. It is not with pigpio, but hope you can shed some light. This one has to do with I2C. Same project as above. The system has the following devices on the I2C bus 2 LCD (20 char x 4 lines ) , Humidity, pressure , SX1506 ( gpio expansion ) and the pcb micro. The I2C bus is at baudrate=100000. There have been strange characters on the LCD , the humidity probe has random errors, and there are random errors with the sx1506 and the pcb micro. We know the Adafruit's LCD which is using the I2C backback is a heavy user of the I2C. When it is writting to the LCD, it looks like there are about 2000 messages per second.( we put an I2C analyzer on the bus ).

We are wondering if the python drivers (SMBUS ) for the I2C bus has a timing problem and if so is there a baudrate value that would minimize or eliminate the errors? Or should we be using a different driver?

from pigpio.

joan2937 avatar joan2937 commented on September 26, 2024

Are you making all the I2C calls from the same thread? It shouldn't make a difference, I'm just wondering.

I only use I2C when I'm playing with a device and have no real-world experience of expected error rates.

I'd be tempted to remove one device in turn to see if the errors stop.

You can set the I2C bit rate with a device tree setting in /boot/config.txt. There should be details in /boot/overlays/README.

from pigpio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.