Turning on an LED with GPIO pins

I am very new at coding and am having trouble doing the most basic things with my roc-rk3328-cc. Could someone explain in simple terms how I can use the GPIO pins to turn on an LED?

You need to add a LED and resistor in series from a GPIO pin to a ground pin. Then you can just use sudo lgpio set PIN#=1. Replace PIN# with the header pin number (1-40).

1 Like

Great! Is there a place I can go to learn the syntax for more commands? Like setting certain pins as inputs or outputs?

Are there other things I need to do first to allow me to access that? When I try inputing the command in the terminal, it doesn’t recognize the command lgpio.

This only works with Ubuntu and Raspbian images found on our distro servers.