B4J Library [PyBridge] LGPIO - Raspberry Pi GPIO

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.

1741675707435.png
WhatsApp Image 2025-03-11 at 08.49.56_218cc703.jpg



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
    5.3 KB · Views: 27
Top