electroRF
Member
Hi,
In the BBB (beagleboneblack), the following program changes the LED's state:
How does it work?
Is there an interrupt when the file "brightness" is written, which changes the LED's state according to the input?
Or other method for checking the file's content?
Thank you.
In the BBB (beagleboneblack), the following program changes the LED's state:
Code:
int main()
{
FILE *led;
led = fopen("/sys/class/leds/beaglebone:green:usr3/brightness", "w");
while(1)
{
fprintf(led,"%d",1);
fflush(led);
pauseSec(1);
fprintf(led,"%d",0);
fflush(led);
pauseSec(1);
}
fclose(led);
return 0;
}
How does it work?
Is there an interrupt when the file "brightness" is written, which changes the LED's state according to the input?
Or other method for checking the file's content?
Thank you.