🛠 Allumer une LED depuis le connecteur GPIO

ODROID-M1 (Hardkernel) · debutant · Schéma : IMG-odroid-m1-debutant-1-odroidm1-led-gpio.svg — LED et résistance 330 Ω branchées sur le connecteur 40 broches de l'ODROID-M1, masse commune

Objectives

Discover the 40-pin connector of the ODROID-M1 and light up an external LED with libgpiod, Linux's modern GPIO interface, without proprietary libraries. The RK3568B2 (quad Cortex-A55) exposes its pins via the character device /dev/gpiochipN.

Hardware

Complete code

# Installer libgpiod (paquet gpiod sur Armbian/Debian)
sudo apt-get install -y gpiod

# Lister les banques gpio0..gpio4 du RK3568B2 et trouver une broche libre
gpioinfo

# Impulsion 2 s sur une broche (exemple gpiochip1 ligne 22 : à adapter)
sudo gpioset -t 2s gpiochip1 22=1

Expected verification

The LED lights up for 2 seconds and then turns off cleanly. The two onboard LEDs (red led-power, blue led-work with heartbeat trigger) remain independent and visible in /sys/class/leds/.

Common errors

Other tutorials for this board

Code examples for this board

← Back to the board 🛠 All tutorials