Mar 11, 2025 Replies: 1 Based on: https://abyz.me.uk/lg/py_lgpio.html Tested on RPi 5. It should be compatible with most boards. With the latest version of Raspbian, everything needed is preinstalled (Python and lgpio). For now the GPIO related features are wrapped. The attached example demonstrates the simple usage. The LGPIO class is inside the example. Make sure to call gpio.Close before ending the program. Otherwise, the GPIO will remain locked for some time. This means that you shouldn't kill the app from the IDE, but rather close it from the window (or add a different way to properly call close before killing the process). Getting started with RPi 5: https://www.b4x.com/android/forum/threads/raspberry-pi-5-first-steps.166049/#content Attachments LGPIOExample.zip LGPIOExample.zip 5.3 KB · Views: 479 Click to expand...
Based on: https://abyz.me.uk/lg/py_lgpio.html Tested on RPi 5. It should be compatible with most boards. With the latest version of Raspbian, everything needed is preinstalled (Python and lgpio). For now the GPIO related features are wrapped. The attached example demonstrates the simple usage. The LGPIO class is inside the example. Make sure to call gpio.Close before ending the program. Otherwise, the GPIO will remain locked for some time. This means that you shouldn't kill the app from the IDE, but rather close it from the window (or add a different way to properly call close before killing the process). Getting started with RPi 5: https://www.b4x.com/android/forum/threads/raspberry-pi-5-first-steps.166049/#content
Erel B4X founder Staff member Licensed User Longtime User Mar 11, 2025 #2 Note that with PyBridge 0.7 there is a noticeable delay between the hardware button click and the event being raised. This is fixed with PyBridge 0.8 (attached and will be included in next update). Attachments PyBridge.b4xlib PyBridge.b4xlib 23.7 KB · Views: 419
Note that with PyBridge 0.7 there is a noticeable delay between the hardware button click and the event being raised. This is fixed with PyBridge 0.8 (attached and will be included in next update).