In this repository you can find some example to use the GPIO line of the Raspberry Pi 4.
-
Install libgpiod following the official guide in this link: https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/tree
-
Compile using the following command:
gcc -lgpiod <name>.c
-
Try it:
./a.out
If you are new in Raspberry, you can start from this. It is a simple program where the led is setting on and off 20 times.