Beagleboard:C/C++ Programming

Blinking USR0 on the BeagleBone
1) Connect your BeagleBone to your computer using a Mini-USB Data Cable. 2) Using a terminal shell, such as  PuTTy, serial connect into your BeagleBone and log in as 'root' 3) Now, we will create a simple C program that turns an on-board LED on and off ten times. Type this into your terminal shell. nano example.cpp 4) Copy and paste this code into the "nano" text editor. 5) Next, press Ctrl+X, type "Y" to save changes, and press enter. 6) Now, we need to compile the program and make an executable file so you can run it. Type the following into your terminal shell. g++ example.cpp -o example 7) Finally, run the program with this command. ./example 8) When you run the program, it will output "LED Flash Start" and will turn the USR0 light on the BeagleBone on and off 10 times. When it has finished, it will output "LED Flash END" on your terminal shell. 9) If you would like more information on this, check out Derek Molloy's video. His video also includes instructions on how to install a C/C++ IDE on your BeagleBone.