Pivore

My first robot is a fairly simple 2WD photovore with a Raspberry Pi for the brains. I really liked that I could program a simple robot in my favorite high-level language, Python!

I also posted the code on GitHub: https://github.com/anseljh/pivore

The Pivore has two photocells mounted up front on some tiny boards I soldered together, which are hooked up to an analog/digital converter (MCP3008). Motors are driven by the usual L293D, with an I/O expander (MCP23008) in between. There is a bumper switch in front for when it runs into stuff. Of course there are also some blinky LEDs!

One challenge I ran into is varying the speeds of the two motors. Unfortunately, the Pi has only one PWM output, so I'll have to do something different, like:

I'll figure that out for bot #2!

Roams around looking for light

  • CPU: Raspberry Pi
  • Operating system: Occidentalis v.02
  • Programming language: Python
  • Sensors / input devices: Photoresistors, bumper switches

This is a companion discussion topic for the original entry at https://community.robotshop.com/robots/show/pivore

**I2C and an Arduino is also an option **

The current platform I am working on uses 2 Arduino’s and a Pi for brains. One Ard runs the motors and the other reads the sensors. This has worked out good so far. The Ards interface with the realworld a lot easier than the Pi. You could also use the usb serial bus.

like it

Looks nice. I wanted to see a video if possible.

pi-blaster

Have you looked into pi-blaster to enable DMA software based PWM on all Raspi GPIO pins?  https://github.com/sarfata/pi-blaster/  Perhaps not the best choice since you are using some pins for non-PWM operation but I thought I’d mention it.