A Python module to control the GPIO on a Raspberry Pi 2016
Brought to you by: croston
To get started with RPi.GPIO, it would be worthwhile reading the examples in the project wiki (link above).
Note that this module is unsuitable for real-time or timing critical applications.
This is because you can not predict when Python will be busy garbage collecting. It also runs under the Linux kernel which is not suitable for real time applications – it is multitasking O/S and another process may be given priority over the CPU, causing jitter in your program. If you are after true real-time performance and predictability, buy yourself an Arduino! (see http://www.arduino.cc )
Note that the current release does not support SPI, I2C, 1-wire or serial functionality on the RPi yet. This is planned for the near future – watch this space!
Hi, Think I’ve found what the problem is. RPi.GPIO edge detection relies on sysfs GPIO, which is deprecated since kernel 4.8 (i believe) : https://www.kernel.org/doc/html/latest/admin-guide/gpio/sysfs.html I’ve read that it’ll be removed in 20 20 ; i.e. about tomorrow. And it turns out that alpine linux 3.11.2 dropped support of sysfs gpio in their kernel. Any plan to move RPi.GPIO on to the new character-device-gpio approach ? David
edge detection no longer working on Alpine linux 3.11.2 (kernel 5.4)
I can confirm that behavior on the Raspberry Pi 4 (4GB). Running with sudo works. Let me know if I can assist in order to fix this.
When using event with edge-mode GPIO.BOTH it is required to get the reason for the event. Polling with GPIO.input(channel) inside the callback does unfortunately not work when the switch at the GPIO-Port is bouncing. I would be very grateful if you could forward the logic level of the event from kernel to the callbackfunction.
When using event with edge-mode GPIO.BOTH it is required to get the reason for the event. Polling with GPIO.input(channel) does unfortunately not work when the switch at the GPIO-Port is bouncing. I would be very grateful if you could forward the logic level of the event from kernel to the callbackfunction.
Rate This Project
Excellent, easy to use library. The docs might be the best I’ve ever seen supporting an open source library. Very clear and complete.
Best tool for prototyping GPIO-related stuff on Raspberry PI.
Really great and easy to access. Far easier to use than GPIOZERO – their documentation is intended to lower the entry bar, but really, one ends up jogging through their doc to find info.
A useful tool for advanced GPIO interfacing.
so which controller is best for real time applications
Additional Project Details