Comments (6)
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.
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.
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.
Added to V38.
from pigpio.
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.
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)
- Pigpio BB Serial Read CPU Resource vs. RPI version HOT 4
- Is there a way to flush an open gpioSerialRead buffer? HOT 9
- event_callback with 0 bytes
- Issue with pigpio Initialization on Raspberry Pi 5 Model B HOT 1
- Understanding pigpiod command implementation HOT 9
- Glitch filter active while doing bbSerialRead? HOT 3
- SPI Slave - BSCX not consistently working RPi4B HOT 6
- i2c_open() returns the same handle for two devices on the same bus HOT 37
- Scheduling repetitive SPI writes HOT 3
- Isr doesn't work on raspberry os 12.5 HOT 3
- Continuous Wave Program Concept HOT 6
- SPI6 mode 3 HOT 1
- Leave CS low HOT 1
- Pigpio stuck on activating HOT 4
- Adding new functions to the library HOT 2
- Missed packets using RaspberryPi and nRF24L01. HOT 8
- Python 3.11.2 is installed but still getting "Depends: python:any (>= 2.7~) but it is not installable" HOT 2
- gpioSetISRFunc error -123 HOT 1
- setup.py does not work with python 3.12
- libpigpio1 and libpigpio-dev version issue with pigpio
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pigpio.