From the shell I can activate the leds on my system like this:
#echo 1 > /sys/class/leds/NAME:COLOR:LOCATION/brightness
I want to do the exact same thing from a C program, but I have not been able to find a simple example on how to accomplish this?
Open the sysfs node like a file, write ‘1’ to it, and close it again.
For example: