Wednesday, April 18, 2012

Raspberry Pi - Day 1

After a long wait, a quick rush to order at 1 AM, and another slightly shorter but long wait, my first Raspberry Pi showed up on my doorstep. I have been prototyping a system to basically create a home sentry system (aka Turret from Portal 2).

Up until this point, I have been using a SheevaPlug with a USB soundcard, a USB camera, and an Arduio with a Motor control shield. I ran the ARM version of Debian, which the RPi has a release already created as well. On top of that, I use the OpenCV library in a Python script to handle the webcamera feed and detect movement. If no movement occurs after a long time, the bot starts talking to itself. When it detects movement, it  plays sounds from the "Detect Movement" bank and runs the motor to open the arm sockets. When it detects noise, it plays sounds from the "Detect Noise" bank. After a interval, if noise or movement stops, it goes back into a Caution state and plays caution sounds for a while and retracts the arms, then goes back into a sleep state. I did a quick prototype prior to digging into OpenCV using a great app called "motion".

A rather simple project, but one that involves computer vision, motor control, audio files, and is possible to do extremely inexpensively, especially due to the RPi being $40.

Code will be posted when I get to at least an Alpha state of the project.

Tonight, I was able to load my SD-card with the Debian install, expand it out to the full size using a GParted Live disk in a VirtualBox window on my Windows 7 PC, and accessed the RPi via SSH. I then loaded motion, opencv and python-opencv. Python is already installed. It looks like the uvcvideo module is not installed and I am having problems grabbing the kernel sources to import it myself.

So, I guess this puts an end of my first day of this.