2014 Fall Mobot Tutorial Wiki

Meeting 1 Slides: http://roboticsclub.org/redmine/attachments/download/681/Mobot.pptx

Kit information

Kit parts: https://docs.google.com/spreadsheets/d/1EsVXvhnv7uK04XOaw85-hedyqBzIjzfdL_7_mrz4Is8/edit?usp=sharing

BeagleBone I/O Control in Python

Adafruit I/O Library: https://learn.adafruit.com/setting-up-io-python-library-on-beaglebone-black/overview
- I2C
- Servo https://learn.adafruit.com/controlling-a-servo-with-a-beaglebone-black/overview

Adafruit tutorial for Wifi: https://learn.adafruit.com/setting-up-wifi-with-beaglebone-black

BeagleBone I/O Control in C++

The pins on the BeagleBone black are controlled by reading and writing to files in the operating system. This can be done in a standard terminal, or in C++ by calling a terminal function.

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.

BeagleBone Image Processing with Pygame

Code presented by Sam on 10/11: http://roboticsclub.org/redmine/attachments/download/684/video_test.py

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: http://roboticsclub.org/redmine/attachments/download/683/camtest.cpp

Example openCV code (not Mobot related): https://sites.google.com/site/theelectronbazaar/home/projects/cam2cam
Code: http://roboticsclub.org/redmine/attachments/download/682/videoGrab.cpp
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
- [[https://learn.adafruit.com/setting-up-io-python-library-on-beaglebone-black/installation-on-ubuntu|Adafruit IO Library]]: for access to pins and peripherals
- [[http://www.pygame.org/news.html|Pygame]]: For camera access and image processing
- pyserial: For access to UART serial port
- vim and emacs text editors

Reference Manual: http://www.adafruit.com/datasheets/BBB_SRM.pdf

Instructions for using Raspberry Pi

Raspi setup

  1. Connect the raspberry pi to your computer using a ttl console cable: https://learn.adafruit.com/adafruits-raspberry-pi-lesson-5-using-a-console-cable?view=all

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: https://learn.adafruit.com/adafruits-raspberry-pi-lesson-4-gpio-setup/configuring-i2c
  1. To use I2C: https://learn.adafruit.com/using-the-bmp085-with-raspberry-pi?view=all

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 Magnifier (12.4 KB) Nishant Pol, 09/20/2014 01:43 pm

camtest.cpp Magnifier (1.13 KB) Nishant Pol, 10/11/2014 04:04 pm

video_test.py Magnifier (2.23 KB) Nishant Pol, 10/11/2014 06:15 pm