https://github.com/eugenedakin/lgpio-inputbutton
Project with lgpio library with the Raspberry Pi to accept an input signal from a physical switch.
https://github.com/eugenedakin/lgpio-inputbutton
electronics gpio input lgpio raspberry-pi raspberrypi xojo
Last synced: 9 months ago
JSON representation
Project with lgpio library with the Raspberry Pi to accept an input signal from a physical switch.
- Host: GitHub
- URL: https://github.com/eugenedakin/lgpio-inputbutton
- Owner: eugenedakin
- License: mit
- Created: 2023-07-07T12:50:23.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-10-17T17:48:30.000Z (over 1 year ago)
- Last Synced: 2025-06-19T03:39:14.637Z (about 1 year ago)
- Topics: electronics, gpio, input, lgpio, raspberry-pi, raspberrypi, xojo
- Language: Xojo
- Homepage:
- Size: 2.63 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# lgpio-InputButton
Project with lgpio library with the Raspberry Pi to accept an input signal from a physical switch.
This example uses the latest and most compatible library for the Raspberry Pi in Xojo 2023 r1.1. The Xojo library can be downloaded for free at: https://github.com/eugenedakin/lgpio-GPIO. This is a lgpio local library that is a replacement for the deprecated sysfs library that
is to be used with Xojo apps. This library uses local c language calls, which means updates should be minimal and your code should be stable for a very long time.

Below is an electrical schematic for the input button project.

The lgpio library can be installed Raspberry Pi OS (5 July 2023) and instructions
are available at http://abyz.me.uk/lg/download.html
Install instructions are:
1) sudo apt install swig python3-dev
2) sudo apt install python3-setuptools
3) sudo apt-get install libunwind8
4) wget https://github.com/joan2937/lg/archive/master.zip
5) unzip lg.zip
6) cd lg
7) make
8) sudo make install
9) create a Blink example program and copy the program and libraries to the RaspberryPi Desktop
10) give the executable permission to run with something like: 'sudo chmod +x LibGPIODInput'
11) run the program with something like: 'sudo ./LibGPIODInput'
This example project uses the lgpio libray and executes a loop to search for a signal from a physical button with an input electronic pin port on the Raspberry Pi.