Skip to content

Using GPIO pins for LEDs

Dimitris Panokostas edited this page Dec 20, 2021 · 5 revisions

Starting with Amiberry v4.2, you can use GPIO pins to control activity LEDs.

This guide serves as documentation on how you can use this feature. It's meant for advanced users who know what they are doing! :)

Hardware requirements

  • LEDs to connect to the GPIO pins, with any resistors as necessary. Make sure you know what you're doing, or you may end up burning up your device!
  • Currently, only GPIO pins 18, 23 and 24 are supported. This may change in future updates.
  • Appropriate wiring, including grounding. Again, make sure you know what you're doing here.

Software requirements

  1. Amiberry uses libgpiod to communicate with the GPIO pins, so you'll need to install that first:
  • for Debian/RPI-OS systems: sudo apt update && sudo apt install libgpiod-dev

  • for Arch/Manjaro systems: sudo pacman -S libgpiod

  1. You will need to compile Amiberry from source, adding an extra define (USE_GPIOD):

make -j4 PLATFORM=<your platform here> -DUSE_GPIOD

  1. Finally, elevated permissions are required to access the GPIO pins. This means that you will have to either run Amiberry as root (e.g. with sudo) or modify the system's permissions to allow a normal user access.
Clone this wiki locally