lgpio is a library for Linux Single Board Computers (SBC) which allows control of the General Purpose Input Outputs (GPIO).
reading and writing GPIO singly and in groups
software timed PWM and waves
callbacks on GPIO level change
notifications via pipe on GPIO level change
I2C wrapper
SPI wrapper
serial link wrapper
daemon interface
access control (daemon interface)
file handling (daemon interface)
creating and running scripts (daemon interface)
network access (daemon interface)
See http://abyz.me.uk/lg/examples.html and the examples in the EXAMPLES directory.
ALL GPIO are identified by their gpiochip line number.
A few packages are needed during installation of the Python modules.
On Debian like systems these packages may be installed with the following commands.
sudo apt install swig python-dev python3-dev
sudo apt install python-setuptools python3-setuptools
wget https://github.com/joan2937/lg/archive/master.zip
unzip master.zip
cd lg-master
make
sudo make install