Programming PiRoCon in Python


We have created a python library that makes programming PiRoCon and Initio very simple.

If you are using the PiRoCon on a different robot, you may need to change some of the pin assignments used, but the code itself should be fine

Raspberry Pi Python examples can be downloaded from an LXterminal session and connected to the internet, type in or copy and paste:

wget -O

Then type in:


You will then have a number of python examples to try. Run them with

sudo python
  •  use the arrow keys to move forwards and backwards, spin left or spin right. Space to stop. Use . and , to increase or decrease speed
  • Prints the distance in centimetres from the ultrasonic sensor, once every second
  • Prints the state of the IR line and obstacles sensors, every time the state changes.
  •  use the arrow keys to pan and tilt