Previously we used enable the UART ports by hand, but that’s annoying because it required doing it manually every time the BBB boot. In addition, writing a script wouldn’t work for some reason. For my quadcopter project, the BBB must enable all UART ports by itself at boot, since I can’t fly with a wire hooked onto it. Therefore, I went on and do some digging on this… took a while before anything came up. It’s actually more complicated than I though, having to deal with how device tree works and all… but here’s what I found:
On Windows, we can easily transfer files between the PC and the BBB through SecureShell File Transfer Client. However, in Linux, we will have to use the terminal program Secure Copy or SCP that’s built-in.
Overall, the scp command for copying to a computer (aka use the to computer’s username and ip) is:
scp filename usename@ipaddress:/directory/
In order to use the BealgeBone Black as a flight computer or embedded system in a product, it must be able to launch programs we wrote on start up without having to manually start it after logging in via ssh. Something sweet and simple like an Arduino, when it start, it run the program you put on it. I spent days looking for ways to do this, editing init.d and all, none of them work. And finally, I came across this blog for Raspberry Pi and work perfectly!
So to be sure that the script is running without logging in through the computer, I decided to do a “blink” loop like what we do when we first started Arduino.
In order to use the built-in UART pins on the Beaglebone Black, we must first activate it.
The device name and pins is as follow:
Credit – http://beaglebone.cameon.net/home/serial-ports-uart
|UART0||J1_4||J1_5||/dev/ttyO0||BeagleBone Black only|