Let's Make Robots!


Roams around looking for light

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!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

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.

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

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.