apa102 driver using userspace gpio character device through libgpiod
A python library for accessing
APA102 addressable LEDs using
a library used to access the userspace gpio character device.
Useful for situations where you need to drive LEDs attached to non-SPI capable
I/O lines, or when the in-kernel
spi-gpio driver is not available (example:
Pimoroni Blinkt on the default kernels from mainstream distributions)
The usage of this library is probably frowned upon by virture of
linux/Documentation/driver-api/gpio/drivers-on-gpio.rst, so go and pressure
the Raspberry Pi kernel devs to include
spi-gpio, so we wouldn't have to
resort to custom out-of-tree kernels or evil bitbanging in userspace!
- Linux Kernel >=
- Python >=
- Remember to
pip install apa102_gpiod
- Tests can be found in the
- Only unit tests are present now, more tests welcome.
- Use your favourite test runner to run the tests, or:
pip install setuptools
pip install pytest
python setup.py test
Since we're accessing the GPIOs through the character device and not through some memory-mapped magic, performance is guaranteed to be lower. Here are some test results:
|Device||Software||Achieved data rate (
|RPI3 B||Arch Linux ARM Linux 4.14.37||13962|
- No clock rate control is implemented, since the achieved data rates are
way below the maximum data rates supported by the
- File an issue report if needed.
This project is licensed under the MIT License.
LICENSE.txt for more details.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size apa102_gpiod-0.3.0.tar.gz (5.8 kB)||File type Source||Python version None||Upload date||Hashes View|