Programming python to make BeagleBone on board LED'd blink

I'm on a Ubuntu Linux 11.10 so I used the following command: 

screen /dev/`dmesg | grep FTDI | grep "now attached to" | tail -n 1 | awk '{ print $NF }'` 115200  

Your terminal should show a Logo of Angstrom and then a login screen. Just type in "root" and press enter. 

Now we should see a screen that displays this: 

root@beaglebone:  


So lets download our Blinking python script by typing in the following 

wget http://pastebin.com/raw.php?i=US7UaD31  


[wait for the file to download] 
then we want to rename the file from raw.php?i=US7UaD31 to an easier to type name so lets to the following to rename the file 


mv raw.php?i=US7UaD31 led-blink.py  


now we have the filename renamed to what we want lets run it! (The fun part) 


python led-blink.py  


The python should be running infitely blinking on and off on the led beaglebone onboard LEDs 

Thats it!! 
To stop the python script from running any more go to the BeagleBone terminal and press Ctrl+C to stop the program. If its gridlocked you can do Ctrl+A then press Z

你可能感兴趣的:(Programming python to make BeagleBone on board LED'd blink)