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);
}

}

Advertisements
This entry was posted in Uncategorized. Bookmark the permalink.

9 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?

  6. danymansk8 says:

    Hola! I just got a Beagleboard XM, but it is too old there is no more documentation for it. I need to know how to download the code and start working on it. Could you give me a little hand?

    Thanks in advance!

    • Rafael Aroca says:

      Hi. Did you install Linux? Can you SSH or have a terminal in the board? Almost anything you can do or learn with a Raspberry, you can do with this Board, with the exception of hardware I/O, that is different, but you can still use sysfs to access GPIO, as in RPI…

      • danymansk8 says:

        Thanks for the answer. Unfortunately, I am extremely new at this and I’m having troubles understanding it.

        I have Linux installed in the Board. Which are the next steps? I mean, where should I start coding, where is the code compiled, and how to download it to the board? An example would be the best, but so far haven’t seen any.

        Is there any step by step documentation on how to do it? I’m feeling very lost on this.

        Thanks again for the help.

        Dany

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