BeagleBone Black

From Poison Arrow Programming
Jump to: navigation, search

Beagle Bone Black

The Beagle Bone is an impressive embedded system capable of running Linux. It has a only a single 1 Ghz core. Making the desktop in it slightly slower than the Raspberry Pi. But it has two additional PRU 200Mhz cores for real-time processing and robotics. The issue with the Raspberry Pi is that the processing is not constant time. So program execution does start and finish at exactly the same time. Even if Linux is built with Real Time. This can cause imperfections when using time-critical applications such as PID algorithms of drones, CNC Machining, Engine Timing, etc.

You can think of the BeagleBone's PRU as two built-in Arduinos. But instead of them running at 16Mhz, they run at 200Mhz. You can even program and port over Arduino code to them using | PRdUino.

You will probably find the BeagleBone's biggest hardware features outside the numerous pin's as being the Ethernet port and USB hub. You may rarely nor never use the HDMI port. It's just so useful and quicker to either Putty / SSH into a command-line shell and work from there. Or use | Cloud 9 ([http://192.168.7.2:3000/ide.html | Link for BeagleBone hooked up via USB) to develop directly in Javascript / Bonescript. Web application which actually runs hardware anyone???

NOTE: You will need to use a bit level voltage shifter when working with voltages other than 3.3v. Most documentation on setting up the hardware to do this with the Raspberry Pi works here. I recommend Texas Instruments | TXB0104 or | TXB0108. With these, set OE to the lowest positive voltage you are communicating to (3.3v when communicating to 5v) and set the other pins respectively. It will automatically know if the data direction is coming from the left or the right side of the chip and auto adjust. It is good practice to have grounds on both sides connect to the single ground pin.

Beagle Bone Setup

  1. Buy a MicroSD Card (8GB minimum) and a MicroSD reader (or SD MicroSD adapter + SD reader)
  2. http://beagleboard.org/getting-started - First setup your BeagleBone Black. Get the latest BeagleBone Image and write it to the MicroSD card using the tool described in the webpage.
  3. Hook up a Ethernet cable between your Beaglebone and a Router. Then plug in a Mini USB cable between the BeagleBone and your PC to turn it on. Be sure the metal pin's aren't touching anything conductive (I use a mouse pad. But a true case is better. Not responsible for damages of any kind)
  4. Putty into your box by installing putting and opening http://192.168.7.2, then logging in as root (no password is needed)
  5. run "apt-get update && apt-get dist-upgrade" to update your Debian distribution
  6. run "cd /var/lib/cloud9 && ./update.sh" to update examples

For Drone Development using Mavlink (optional)

  1. run "apt-get install minicom" - uart / tx/rx testing app
  2. run "cd /var/lib/cloud9 && npm install mavlink" (per https://github.com/omcaree/node-mavlink)

Note: The bone_capemgr directory has moved from /sys/devices/bone_capemgr to /sys/devices/platform/bone_capemgr. This is helpful to know if you need to reconfigure pins to be GPIO vs UART or disable the HDMI cape for access to more ports like SPI1.

Also, /media/BEAGLEBONE/env.txt and /boot/uBoot/uEnv.txt has moved to /etc/default/capemgr (file which may not exist). It also has a new syntax. Add "CAPE=BB-SPI-01,BB-UART1,BB-UART2,BB-UART4" to get main ports working. Then reboot.

From here you are ready to start your builds!

Beagle Bone Summarizing - Work in progress

npm install -g mraa

npm install -g serialport

update kernel? page cached somewhere.

Where -g stands for global

If not running Linux natively, use VirtualBox with extra extensions (must be non-commercial!) and run gparted iso livecd. Plug in the micro-sd card into you computer. Do not format if it requests. Set the Virtual Box up with a USB filter for your flash device. Also select System -> EFI so you have Graphics. Use GParted from the desktop and resize the flash drive from 4GB to the max GB on your device.

The issue is we are running an ancient version of nodejs. After following instructions from https://github.com/creationix/nvm to install nvm, run the below nvm install v6.2.2 --reinstall-packages-from=system