2014 Fall Mobot Tutorial Wiki

Meeting 1 Slides:

Kit information

Kit parts:

BeagleBone I/O Control

Step 1: Connect the electrical system
We have provided a recommended electrical setup diagram for a basic mobot. Make sure all voltages and polarities are correct before powering the system.

Pin functions for the board:

Step 2a: Control the motors via C++

Pin control can be done through terminal commands. We have starter code that let you run these commands in your C++ program. This provides digital output, and PWM, which is useful for controlling motors.

Mapping of hardware pins to bank and pin numbers can be found in these charts:

For information on how the terminal commands work:

For GPIO (digital input and output):
Good video describing the process and how to hook up signals:

Also, a tutorial showing how to control GPIO without using 'cd' all the time.

For PWM (output for speed control):
There isn't good documentation, but I am compiling something together for you to use.!msg/beagleboard/wjbOVE6ItNg/Dym4H4HuI8gJ

Step 2b: Control the motors via Python
Adafruit has a GPIO library that can be used to control the I/O pins:

Adafruit I/O Library:
- I2C
- Servo

Adafruit tutorial for Wifi:

BeagleBone Image Processing with Pygame

Code presented by Sam on 10/11:

Tutorial for capturing images from camera, threshold, and blob detection

Tutorial for splitting images into colorspace components, reading and writing images

Presentation with some code snippets

BeagleBone Image Processing with OpenCV in C++

Code to capture and save image:

Example openCV code (not Mobot related):
To compile:
g++ -O2 `pkg-config --cflags --libs opencv` videoGrab.cpp -o videoGrab
To run:

Instructions for using BeagleBone Black

We have already set up Ubuntu and required packages. CMU's LAN connection requires registration of devices, which is a long procedure, so instead we used a non-CMU network to install the packages. Instructions:
BeagleBone Black Setup

For Ubuntu:
username: ubuntu
password: temppwd

Installed packages
- [[|Adafruit IO Library]]: for access to pins and peripherals
- [[|Pygame]]: For camera access and image processing
- pyserial: For access to UART serial port
- vim and emacs text editors

Reference Manual:

Instructions for using Raspberry Pi

Raspi setup

  1. Connect the raspberry pi to your computer using a ttl console cable:

Windows should automatically install the driver. Set the serial port to 115200baud, no parity, 1 stop bit

Username: pi
Password: raspberry

Note regarding shutdown:
Like your computer, it is not good to suddenly switch off power to the raspberry pi. Instead use the shutdown command, then once you lose the ability to type to it via terminal, unplug power.

To shutdown:
sudo shutdown -h now

To restart:
sudo shutdown -r now

  1. Configure Raspi for I2C:
  1. To use I2C:

Note: You need to be connected to the internet to update and install packages. Plugging in an Ethernet cable should do the trick. You can still control the Raspi over serial.

Beaglebone Black Setup

1. Follow instructions on bealgebone getting started to ensure you have the latest Angstrom distribution

2. Follow the following video to capture video from the PSEYE

Detailed video, but specific to a $80 logitech camera (but gives 1080p)

Another option, but did not work:

Previous tutorials

2013 Fall Mobot Tutorial

Materials (2).xlsx - Materials List with prices, quantities and links (12 KB) Spencer Barton, 10/05/2013 02:02 PM

Mobot.pptx - Mobot Meeting 1 Slides (3.21 MB) Nishant Pol, 09/13/2014 01:59 PM

videoGrab.cpp View (12.4 KB) Nishant Pol, 09/20/2014 01:43 PM

camtest.cpp View (1.13 KB) Nishant Pol, 10/11/2014 04:04 PM View (2.23 KB) Nishant Pol, 10/11/2014 06:15 PM

mobotElectrical.pdf (302 KB) Nishant Pol, 11/21/2014 09:10 PM