Getting Started with Hardware GPIO
Libre Computer Board AML-S905X-CC
Copyright Libre Computer Project
What GPIO?
GPIO Limitations
GPIO: Controlling Direction and Level
AML-S905X-CC-V1.0A Headers Reference
All GPIO pins output either 3.3V or 0V with very limited current. Signaling and powering LEDs are the typical use-cases. Do not try to drive high current devices such as DC motors. Use transistors when working with devices that require more than 10mA!
There are two interfaces for controlling GPIO pins in Linux.
GPIO: Controlling Direction and Level via gpiod (ioctl)
This is the preferred method of operating GPIO pins.
sudo apt-get install gpiod
Replace $GPIOCHIP and $GPIONUM with the GPIO chip and unquoted Linux GPIO # from the headers reference.
GPIO: Controlling Direction and Level via file ops
This method is deprecated and will not be supported by Linux long term. Make sure you are root (sudo su)
Replace $GPIONUM with the quoted Linux GPIO # from the headers reference since many GPIOs are controlled by chip1 which is offset by 10.
Where to go from here?