Blinking BeagleBoard-XM LED (C version)

#include

void main() {

FILE *fp;

//Configures LED to be manually controlled
fp = fopen(“/sys/class/leds/beagleboard\:\:usr0/trigger”, “w”); fprintf(fp, “none”);
fclose(fp);

while (1) {
fp = fopen(“/sys/class/leds/beagleboard\:\:usr0/brightness”, “w”); fprintf(fp, “1”);
fclose(fp);
sleep(1);

fp = fopen(“/sys/class/leds/beagleboard\:\:usr0/brightness”, “w”); fprintf(fp, “0”);
fclose(fp);
sleep(1);
}

}

This entry was posted in Uncategorized. Bookmark the permalink.

6 Responses to Blinking BeagleBoard-XM LED (C version)

  1. Asim Kumar Jana says:

    I would like to start working on Beagle Board.

  2. Asim Kumar Jana says:

    Just help me how to get started with Beagle Board-XM.

  3. nic says:

    Thanks a bunch! Worked great for me.

  4. ashwini24 says:

    can u suggest me the header file tat needs to be included?

  5. ashwini24 says:

    can u suggest me a header file to be included?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s