1 Raspberry Pi-powered Diddy Borg
I used the DiddyBorg some time back, but thought I'd give it another go. The SD card runs Wheezy, which I "sudo apt-get update/gradede"(d), to make it work with the v2 camera. Enable camera and I2C via
- sudo raspi-config
(or via the command line). Reboot. Install opencv:
- sudo apt-get install python-opencv
- git clone https://github.com/piborg/diddyborg.git
- git clone https://github.com/piborg/diddyborg-web.git
(see https://github.com/piborg/ for code).
Details are here:
1.1 Running diddy-web
You may have to flip the camera, see . In diddyborg-web/diddyWeb.py, locate:
camera = picamera.PiCamera() camera.resolution = (imageWidth, imageHeight) camera.framerate = frameRate
and add the line
camera.vflip = True
Also, you may want to edit
sudo nano /etc/rc.local
to make diddy-web start automatically. I also added a tiny motion of the diddyborg to indicate when the programme is ready. So I added two lines:
sudo python /home/pi/diddyborg-web/diddyHello.py & sudo python /home/pi/diddyborg-web/diddyWeb.py &
where diddyHello.py executes a tiny (5 degree) turn - big enough to let me know it's running, but small enough for the diddyborg to not fall off the table. With the 2nd line added to rc.local, the web interface runs at startup. (You'll need to know the IP address.)
Over time, the battery case doesn't hold the AAs very firmly anymore. I might pull out the springs again, or jam the AAs in a bit more, using some padding / rubber bands.
Final tip: The bar at the bottom of the web interface adjusts the speed. Reduce the speed to 50% until you're familiar with the field of view. I managed to flp the diddyborg over.