Agobo Robot for Raspberry Pi Model A+ (APB)


AGoBo is the winning name – Suggested by @mcambelluni

Mark will receive a complete AGoBo prototype, as well as the next iteration of the main PCBA.



Starting 29th November 2014 and finishing 1st December, we are running a Twitter based competition to choose a product name for this new robot, codenamed APB01


The winner will receive a complete prototype robot, including the Model A+ and we will ship it worldwide.






This is a prototype robot at the moment, and we expect the specification to change before we start selling it in January. Current specs as follows:

  • Supports Raspberry Pi Model A+ only
  • Size 100 x 80 25mm (excluding wheels)
  • Built-in power supply that works from 6.6V to 12V quite happily, supplying power to both the robot and the Pi
  • Serial connections (for SSH console cable) brought to convenient connector on the edge
  • Standard 4tronix 6-pin I2C breakout connector – direct fit for the IP Display module we make
  • 2 x line follower sensors with indicator LEDs
  • Ultrasonic distance sensor
  • N20 size, metal geared motors
  • 42mm wheels
  • Provided ready soldered. Just screw in your Pi and add batteries.

It really is as easy as Pi to get going in robotics now.

Competition entries (in order of appearance)

  1. mA+rvin – @MarkSwashplate
  2. Colin – @newsliner
  3. Pi2Go Nano – @monkeymademe
  4. Pi2Go mini – @monkeymademe
  5. Eric – @Mruktechreviews
  6. Ratbot (rA+bot) – @monkeymademe
  7. picabot – @TommyBobbins
  8. nitbit – @monkeymademe
  9. berryBot – @monkeymademe
  10. HatBot (hA+bot) – @monkeymademe
  11. DiddyTron – @AverageManvsPi
  12. DiddyBot – @AverageManvsPi
  13. A+ PiBot nano – @BitSkils
  14. The Crumb – @AverageManvsPi
  15. The Mighty Maus – @heeedt
  16. PiBotA+ – @skinnermartin78
  17. GoA+Bot (GoAtBot) – @skinnermartin78
  18. NanoGo – @skinnermartin78
  19. Johnny – @Ascii211
  20. MadgeBot – @ukscone
  21. BiBot – @JarrowComputing
  22. DinkyBot – @skinnermartin78
  23. MidiBot – @skinnermartin78
  24. +SonicBot – @CoderDojoCarm
  25. BotAplus – @treefrog52
  26. BotAppi (BotA+Pi) – @AndyBateyPi
  27. A4 – @sej7278
  28. A Robot – @sej7278
  29. PiBot – @TeCoEd
  30. Alfie – @richard007_1999
  31. AtBot (A+Bot) – @uk_baz
  32. Flat Stanley – @uk_baz
  33. 4tA+v1 – @uk_baz
  34. HalfPint – @skinnermartin78
  35. Swarmer – @zosho
  36. NA+Bot (NatBot) – @skinnermartin78
  37. Pip – @skinnermartin78
  38. BitBot – @skinnermartin78
  39. DotBot – @skinnermartin78
  40. A+Go – @skinnermartin78
  41. A+GoBot – @skinnermartin78
  42. Rudolph – @CoderDojoCarm
  43. RaspAŌÄbot – @skinnermartin78
  44. JittyBot – @JarJarGeek
  45. Pi-onic – @red_dragon25
  46. PocketBot, PocA+Bot – @skinnermartin78
  47. PiAbot – @RobertsDavidJ
  48. PiAtron – @RobertsDavidJ
  49. PintBot – @recantha
  50. AGOBO – @mcampbelluni
  51. PiAGoGo – @mcampbelluni
  52. KinderBot – @APChristie
  53. SchoolieBot – @APChristie
  54. IKnowBot – @APChristie
  55. DeBug – @RobertsDavidJ
  56. aRobot – @Stimmli
  57. rA+pless (ripless) – @MBDilaver
  58. PiPlusBot – @Cloud4Schools
  59. RoboPip – @StefanPlum
  60. piDestroyer – @evgeniyraev
  61. pupPi- @evgeniyraev
  62. HAL 1- @evgeniyraev
  63. a1- @evgeniyraev
  64. Dalek- @evgeniyraev
  65. BugPi – @skeletony
  66. BuggyPi – @skeletony
  67. PiAGo – @skinnermartin78
  68. PiAGoBot – @skinnermartin78
  69. FrogBot – @AndyBateyPi
  70. PiFrogBot – @AndyBateyPi
  71. Piccolo – @ukscone
  72. amphipian – @AndyBateyP
  73. ampibot – @AndyBateyP
  74. apphibian – @AndyBateyP
  75. appibian – @AndyBateyP
  76. MidiBot – @skinnermartin78
  77. MidiTron – @skinnermartin78
  78. Medius – @skinnermartin78
  79. 4tronix build BotAplus – @treefrog52


Finalists (in Order)

  1. AGOBO – @mcampbelluni WINNER
  2. Piccolo – @ukscone
  3. NanoGo – @skinnermartin78
  4. mA+rvin – @MarkSwashplate
  5. Pi-onic – @red_dragon25
  6. BotAppi (BotA+Pi) – @AndyBateyPi
  7. HatBot (hA+bot) – @monkeymademe
  8. BotAplus – @treefrog52



Soldering the UltraSonic & LED PCB Kit

UltraSonic & LED PCB Kit

This kit makes it easy to mount a standard SR-HC04 ultrasonic sensor on the front of a robot. The sensor itself is soldered to the PCB which acts as a carrier, additionally having M3 mounting holes at various spacings.

The board also carries 4 LEDs with the necessary series resistors to be driven directly from Arduino or Raspberry Pi GPIO pins.

Click any image to enlarge.


1. Check you have all the parts


The kit contains:

  • 1 x PCB
  • 1x UltraSonic sensor
  • 1 x Resistor pack (4 x 220R resistors in a SIL package)
  • 2 x White LEDs
  • 1 x Blue LED
  • 1 x Green LED
  • 2 x 4-pin male headers


2. Solder the LEDs


It doesn’t really matter where you put each LED, but the standard way for our Pizazz robot is as shown above.

NB. Ensure that the longer lead (positive) from each LED is soldered into the holes marked with a ‘+’ sign (towards the top of the board in the photo above)


3. Solder the Resistor Pack


The resistor pack must be placed the correct way round, with the white dot next to the ‘1’ marked on the PCB. The writing is therefore point towards the ultrasonic mounting points as shown in the photo above.


4. Solder the 4-pin Male Headers


These should be mounted in the positions either side of the resistor pack. To get the straight, I find it easiest to solder just one pin of each header, then holding the board and header in one hand and the soldering iron in the other, gently melt the solder and move the header so it is straight. There’s a bit of a knack to this ūüėČ


5. Finally, Solder on the UltraSonic Sensor


This should be mounted on the same side as all the other components. You can double check, by checking that the writing on the front of the sensors, matches the pins on the 4-pin header next to it. (ie. VCC is next to VCC, Trig is next to Trig, etc)

Again, solder one pin first then straighten it out using the same method as for the headers.


6. The Completed Board – Ready for Mounting on your Robot



All New PiRoCon2 Robotics Controller

Introducing Pirocon 2

The “Gold standard” robotics controller for the Pi just got better!


As of this week (October 14th 2014), we are shipping version 2.0 of the Pirocon controller board. This has many changes from the previous v1.x versions.

Quick summary of changes:

  • No changes to pinout or functionality – all existing software will continue to operate without change
  • Board shape fits all models of Raspberry Pi including Model B+
  • All active components now surface mount
  • Big 3A regulator for the 5V supply of both the Raspberry Pi and sensors/servos
  • Fully CE certified and RoHS compliant
  • More energy efficient – batteries last longer
  • Improved 3.3V-5V level shifters


Pirocon2 Functional Layout


Clockwise from top left:

  1. Level shift selectors. Remove these jumpers if you want to use an input at 3.3V. Then you can connect directly the GPIO pin using the topmost pin freed by removing the jumper.
  2. Level shifted 3-pin block. A header with 8 sets of 3-pin connectors for 5V inputs or outputs. Note that Ground (0V) is furthest from the GPIO connector – this is opposite side to the Pirocon v1.x boards. From the top, each group of three is: Signal, 5V, Gnd
  3. The 2-pin screw terminal for connecting motor A
  4. A 4-pin terminal for directly connecting a 4-pin ultrasonic sensor – HC-SR04. This is converted on the Pirocon board to a single (selectable) pin into the GPIO
  5. The 2-pin screw terminal for connecting motor B
  6. Red indicator LED for 5V
  7. Orange indicator LED for 3.3V
  8. Selection jumper for GPIO pin to be used for ultrasonic. Default position is pin 8, but pin 23 can also be selected by moving the jumper to the left
  9. An 8-pin female header containing the SPI and voltage (5V, 3.3V, Gnd) signals
  10. This chip is the H-Bridge used to control the motors. It is an L293DD
  11. The 6-pin female header allows you to connect a 4tronix IP Display module or an Adafruit 16-channel PWM board (Adafruit model 815) for controlling multiple servos or LEDs. There are 2 of these headers (left and right) but they contain all the same signals so only one needs to be used, but is is more physically robust if the PWM board is plugged into both sockets.
  12. Selection jumper for motor voltage input. The voltage to drive the motors can be taken either directly from the DC jack input (which is used to generate the 5V for the Raspberry Pi), or from the 2-pin screw terminal on the lower edge of the Pirocon board. For most purposes, you will want this jumper to be on the right (nearest the edge of the board)
  13. The 2-pin screw terminal for an alternative motor power source. Note that this terminal does not power the 5V regulator so cannot be the only source of power
  14. A bank of 4 solder jumpers that connect the motor control pins to the selected GPIO pins. By default these are MISO, MOSI, CE0 and CE1. To change them, you should cut the tiny track between the two halves of the relevant jumper, then connect to the pin you want to use. This option is provided for flexibility, but most people will not need to change it
  15. These two jumpers permanently enable each motor driver. From a purest point of view, it is better to use these enable pins to provide the PWM signal to each motor and only use the motor control pins to determine the direction. However, in most circumstances it makes very little difference, so all the library software assumes 4-wire control and not 6-wire control. Leaving these jumpers in place ensures each motor is always enabled.
  16. Input DC jack for the regulator (and generally also for the motors). This is a 2.1mm pin jack, with centre positive. The voltage should be between 7V and 12V DC. Lower than 7V and the regulation may not be sufficient. Above 12V then the regulator may begin to overheat
  17. The left side connect for Adafruit’s PWM board – see item 11
  18. I2C and Serial (Rx, Tx) breakout female header
  19. Bi-directional level shifter chip. This converts the 5V signals to/from the 8×3 male header block into 3.3V signals for the Raspberry Pi


Software Support

  • In ScratchGPIO, use the addon name “PiroconB”. Download from here
  • For Python, use the standard Initio/Pirocon library available here. Although designed specifically for the Initio robot chassis, it will work unchanged for most robots with 2 drive motors



  • Pins 15 & 16 (Broadcom GPIOs 22 and 23) are swapped from what is shown on the silk screen
  • Pin 11 is shown as GPIO 07 on the jumper bank, instead of GPIO 17


Wiring the Unotron for Raspberry Pi & Microcon 3

Wiring the Unotron with Raspberry Pi and Microcon 3

Click on any image to enlarge.



For the basic mechanical building instructions, please refer to here


Step 1 – Fit the Mounting Pillars


For the Model B+ you should place 4 of the 25mm pillars in the positions shown above. (Note that the one bottom-right in above picture will need the screw removing later to allow the motor to sit properly on the baseplate)

For Models A or B only 2 pillars are required in the positions shown with red ring.


Step 2 – Fit the Raspberry Pi


After screwing in all 4 pillars for the B+, then remove the screw underneath the bottom right-hand pillar so it sites on the baseplate but isn’t screwed in.

Also, note the rubber bumper on the bottom of the mounting pillar of the Microcon v3. This rubber bumper rests onto the PCB of all models (For the Model A and B, you can removed the rubber bumper so the Microcon sits flat with its pillar on top of the mounting screw)


Step 3 – Push On the Microcon v3


Make sure it is connect correctly to the end of the GPIO connector. For the B+ there will be 14 pins left exposed. For Models A and B, all pins will be covered.


Step 4 – Connect The Motor


Screw in the motor (see instructions for base build here, steps 1 to 7

Depending on the wiring to the motor, you may need to swap the wires so that the software moves forwards and not backwards when required. Check this when first testing the software


Step 5 – Connect the Servo Lead


Plug the servo lead into the position shown (marked 22 on the PCB). Make sure you have this the correct way round with the Black wire next to Gnd, Red wire on 5V and White wire on Sig(nal)


Step 6 – Plug in the Ultrasonic Sensor


Plug the sensor into the breadboard – approximately centred left to right, but it is not critical

Then connect 4 of the 30cm Male-Female wires, ensuring you plug into the same 4 columns of the breadboard as the sensor is in


Step 7 – Wire the Ultrasonic Sensor to Microcon


Ensure that the wires match the signal names printed on the sensor and the PCB. So:

  • Gnd -> Gnd
  • Echo -> Echo
  • Trig (or Ping) -> Ping
  • Vcc -> 5V


Step 8 – Wire in the Line Follower Sensors


Again it is important that the voltage is the correct way round. Connect:

  • G -> Gnd
  • V+ -> +5V
  • S -> Sig

The Left sensor should be plugged into the 3 pins labelled 07

The Right sensor into pins labelled 11


Step 9 – Wire in the Battery Pack


Very Important: The positive (Red wire) goes into the terminal marked Vin, and the negative (Black wire) into the terminal marked Gnd. If you get these the wrong way round, you will damage the driver chip.


Testing & Software

You have now completed the wiring of the Microcon onto the Unotron single-wheek robot. Please download the sample code to test it, remembering that you may need to swap the motor wires so forwards is forwards and not backwards. With the Pi powered up and connected to the internet, go into a terminal window (eg LXTerminal) or from the startup terminal if that’s how you run your Pi, then type (or copy and paste):

wget -O

When that is complete, type:


Now you will have a new folder /home/pi/unotron with a library module and examples to try. Eg:

sudo python




Pan & Tilt Kit for Pi2Go-Lite and Pi Camera

Pan & Tilt Kit for Pi2Go and Pi2Go-Lite



You can download a PDF of this guide from here

This system allows you to use the Pi Camera in 3 different ways with your Pi2Go or Pi2Go-Lite

  1. Fixed camera
  2. Camera with Pan control
  3. Camera with Pan and Tilt Control


All the parts are included in the kit for the complete Pan/Tilt assembly (except the Pi Camera which is an optional extra). You choose which system you want, and it is easy to change from one to another simply by undoing and replacing a few screws.


Step 1: Identify the Parts


Included in the kit are the following parts:

  • 1 x Base mounting plate
  • 1 x Servo mounting plate
  • 1 x Camera mounting plate
  • 2 x Servo arm mounting plates
  • 2 x Tower Pro SG92R carbon fibre micro servos
  • 4 x M3 Self tapping 6mm screws (for attaching servo arms)
  • 4 x M2.5 screws 6mm (for mounting the servos)
  • 4 x M1.7 self-tapping screws 5mm (black, for mounting camera)
  • 2 x M3 male-female pillars 12mm
  • 1 x 200mm camera cable


Step 2: Solder the Camera Mount to a Servo Arm Plate


  • Push the camera mount plate, with the camera markings on the inside as shown, into one of the servo arm plates
  • Tack solder in one place
  • Adjust the fitting until the camera mount is at right angles to the arm plate
  • Solder all the other places on both sides for maximum strength (in fact there is very little weight, so only a couple of points need soldering if you’re in a hurry!)


Step 3: Solder the Tilt Servo Mount to a Servo Arm Plate


Make the tilt servo assembly in the same way as the camera mount assembly


Step 4: Attach the 12mm Pillars to the Pi2Go


One at a time, remove the existing screws that hold on the front caster assembly on and replace them with the 12mm pillars.

Keep the screws for use in Step 6

Screw on firmly.


Step 5: Attach the Pan Servo to the Base Mounting Plate


  • Push the servo through the hole in the base mounting plate¬† so the servo tabs are on the upper surface
  • Use 2 of the 6mm M2.5 screws to screw directly into the mounting holes of the servo from underneath


Step 6: Fit the Base Mounting to the Pi2Go


Use the 2 screws you removed in step 4 to screw the base mounting plate

Attach  the straight servo arm using the small screw in the servo bag. Fit it so that it runs front to back as shown, when the servo is in its middle position


Step 7: Fit the Tilt Servo Mount Assembly to the Pan Servo


Use 2 of the 6mm self-tapping screws provided. Do NOT use the 2 self-tapping screws in the servo bag as they are too long

The holes in the servo arm plate line up with the third hole out from the centre on each side of the servo arm.


Step 8: Fit the Tilt Servo into the Servo Mount


This time, push the servo in from the back of the board and screw in using the last 2 of the 6mm M2.5 screws

Attach  the straight servo arm using the small screw in the servo bag. Fit it so that it runs top to bottom as shown, when the servo is in its middle position


Step 9: Fit the Camera to the Camera Mounting Plate


Use the 4 very small black self-tapping screws to mount the camera. DO NOT TIGHTEN the screws at all. Leave them loose or you will bend and damage the camera board

You can mount it in 2 positions, as shown on the silk screen. When used with both Pan and Tilt, we find it is best to mount it in the orientation shown above.

Fit the 200mm camera cable carefully into the camera connector


Step 10: Fit the Camera Assembly to the Tilt Servo Arm


Use 2 of the 6mm self-tapping screws provided. Do NOT use the 2 self-tapping screws in the servo bag as they are too long

The holes in the servo arm plate line up with the third hole out from the centre on each side of the servo arm.


You have now completed the assembly of the Pan Tilt mechanism.

Fitting Wheel Encoder Sensors to Pi2Go-Lite

Wheel Encoders on Pi2Go-Lite

You can also download a PDF of this guide from here

These simple encoders provide 16 pulses per revolution of the main wheels and allow you to program your vehicle to:

  • Travel in straight lines, even if the motors naturally move at slightly different speeds
  • Travel a fixed distance
  • Turn a set angle

The Pi2Go-Lite is already able to take the sensors. Both the Python library and ScratchGPIO incorporates the sensors and allows you to easily write your own programs to use them as you wish.

The encoder/sensors are supplied as a kit and require some soldering to complete.


Fitting the Encoder Sensors

Step 1: Identify the parts

** NB. Please check you have the correct resistors in the pack BEFORE soldering. We think there may be a few wheel sensor packs with incorrect resistors, so please double check first as it is much easier to resolve the problem before soldering. Specifically the 10K resistors may be incorrect, check they have Brown, Black and Orange stripes


Note: Check which Pi2Go-Lite main PCB you have as the instructions are slightly different

  • v1.0: The selection jumpers are not included with v1.0 and a cut needs to be made on a solder jumper to enable wheel sensors
  • v1.1: The selection jumpers and header is included with the base kit, so not separately required for the wheel sensor kit
  • v1.2: The base kit includes a slide switch to select line follower or wheel sensors, so not required in the wheel sensor kit


  • 2 x encoder discs (if this pack was ordered at same time as the Pi2Go-Lite, the discs will already be fitted to the wheels)
  • 2 x IR reflectance sensors
  • 2 x resistors 10K (Brown, Black, Orange)
  • 2 x resistors 220R (Red, Red, Brown)
  • 3×2 male jumper block: Not required for v1.1 and above
  • 2 x 0.1″ jumpers: Not required for v1.1 and above


Step 2: Attach the Wheel Encoder Discs


I prefer to use 5 drops of superglue – one on each spoke of the wheel. Then drop the encoder disc into each wheel as shown, with the black/white markings uppermost. Leave to dry while you get on with the soldering.

If you prefer, you can also use double-sided adhesive pads

Ff the wheel sensor pack was ordered at same time as the Pi2Go-Lite, the discs will already be fitted to the wheels


Step 3: Cut the Selector Tracks – v1.0 ONLY


** This step is only required for v1.0 PCBs

On the left of the Pi2Go-Lite is an empty position for the 3×2 male header block. To each side of that is a pre-linked solder jumper – click on the image above to enlarge and clarify. You need to cut these links carefully using a sharp craft knife. Be careful not to cut anything else!

When these links are cut and the jumper block added, then you can select whether to use line-follower sensors or wheel sensors. There are not sufficient available GPIO pins on the 26-0pin connector for both to be in operation at once.


Step 4: Add the IR Sensors


As when building the Pi2Go-Lite kit originally, you should cut the pins on the sensors, next to the flattened part on the legs. Then solder them on.

NB. The Blue LED for the left sensor is at the front, but the blue LED for the Right sensor is at the rear. Use the silk screen angles to identify.

Snip the plastic legs/fixings off the sensors, or these will impeded the mounting of the motors.


Step 5: Add the 10K Resistors (Brown, Black, Orange) – v1.0 Only ***

As shown in the image above, these need to be connected directly to the sensors on the top of the board.

Bend the legs on each resistor and cut off all but 4mm of the legs, then solder on carefully


Step 6: Add the 220R Resistors (Red, Red, Brown)


These can be soldered into the middle of the board in positions marked with an asterisk.

** For v1.1 PCBs and above, also fit the 10K resistors (Brown, Black, Orange) to the positions next to the 220R resistors


Step 7: Add the Jumper Block – v1.0 Only


** v1.0 only Ensure you have cut the 2 tracks as described in step 3. It is really difficult to cut the tracks after the jumper block is fitted.

Now solder on the 3×2 male jumper block.

Important Info: The jumpers (or switch for v1.2 and above) can be placed in one of 2 positions:

  • Front: Use the line follower sensors
  • Rear: Use wheel sensors


The wheel sensors are now ready to go.


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

Python Software for Pi2Go

Python Software: Library & Examples

If you are setting up a new SD card, please follow the instructions in this PDF

We have created a python library module that allows you to use the same software to drive either the Pi2Go or the Pi2Go-Lite. Some functions can be directly mapped between the two products, but other functions will only work one one model or the other.

  • Download the latest version of the software using wget like this from a command line (eg. LXTerminal):
    wget -O
  • This will create a new folder on your Pi in the /home/pi folder called pi2go
  • Run the example files using the following (example is for motorTest):
    sudo python
  • You need to use sudo as admin rights need to allow access to the GPIO pins

 **NOTE** The hardware driven servos used on Pi2Go (not Pi2Go-Lite) must be driven using the on-board servo and PWM driver chip shared with the RGB LEDs. See this Adafruit tutorial for driving servos with this chip as it is the same one used in their 16-channel PWM/Servo driver. The Pi2Go servos are on the top four pins of this chip (pins 12 to 15).

Library Functions:

# General Functions
# (Both versions)
# init(). Initialises GPIO pins, switches motors and LEDs Off, etc
# cleanup(). Sets all motors and LEDs off and sets GPIO to standard values
# version(). Returns 1 for Full Pi2Go, and 2 for Pi2Go-Lite. Invalid until after init() has been called

# Motor Functions
# (Both Versions)
# stop(): Stops both motors
# forward(speed): Sets both motors to move forward at speed. 0 <= speed <= 100
# reverse(speed): Sets both motors to reverse at speed. 0 <= speed <= 100
# spinLeft(speed): Sets motors to turn opposite directions at speed. 0 <= speed <= 100
# spinRight(speed): Sets motors to turn opposite directions at speed. 0 <= speed <= 100
# turnForward(leftSpeed, rightSpeed): Moves forwards in an arc by setting different speeds. 0 <= leftSpeed,rightSpeed <= 100
# turnreverse(leftSpeed, rightSpeed): Moves backwards in an arc by setting different speeds. 0 <= leftSpeed,rightSpeed <= 100
# go(leftSpeed, rightSpeed): controls motors in both directions independently using different positive/negative speeds. -100<= leftSpeed,rightSpeed <= 100
# go(speed): controls motors in both directions together with positive/negative speed parameter. -100<= speed <= 100
# Wheel Sensor Functions
# (Pi2Go-Lite Only)
# stepForward(speed, steps): moves the unit forwards specified number of steps, then stops
# stepReverse(speed, steps): Moves backward specified number of counts, then stops
# stepSpinL(speed, steps): Spins left specified number of counts, then stops
# stepSpinR(speed, steps): Spins right specified number of counts, then stops

# RGB LED Functions
# (Full Pi2Go only)
# setLED(LED, Red, Green, Blue): Sets the LED specified to required RGB value. 0 >= LED <= 4; 0 <= R,G,B <= 4095
# setAllLEDs(Red, Green, Blue): Sets all LEDs to required RGB. 0 <= R,G,B <= 4095

# WHITE LED Functions
# (Pi2Go-Lite only)
# LsetLED(LED, value): Sets the LED specified to OFF == 0 or ON >= 1
# LsetAllLEDs(value): Sets both LEDs to OFF == 0 or ON >= 1

# IR Sensor Functions
# (Both Versions)
# irLeft(): Returns state of Left IR Obstacle sensor
# irRight(): Returns state of Right IR Obstacle sensor
# irCentre(): Returns state of Centre IR Obstacle sensor (Full Pi2Go Only)
# irAll(): Returns true if any of the Obstacle sensors are triggered
# irLeftLine(): Returns state of Left IR Line sensor
# irRightLine(): Returns state of Right IR Line sensor

# UltraSonic Functions
# (Both Versions)
# getDistance(). Returns the distance in cm to the nearest reflecting object. 0 == no object

# Light Sensor Functions
# (Full Pi2Go only)
# getLight(Sensor). Returns the value 0..1023 for the selected sensor, 0 <= Sensor <= 3
# getLightFL(). Returns the value 0..1023 for Front-Left light sensor
# getLightFR(). Returns the value 0..1023 for Front-Right light sensor
# getLightBL(). Returns the value 0..1023 for Back-Left light sensor
# getLightBR(). Returns the value 0..1023 for Back-Right light sensor

# Servo Functions
# startServos(). Initialises the servo background process
# stop Servos(). terminates the servo background process
# setServo(Servo, Degrees). Sets the servo (0 or 1) to position in degrees -90 to +90

# Switch Functions
# getSwitch(). Returns the value of the tact switch: True==pressed

Pi2Go-Lite Released at CamJam 6th September 2014

Pi2Go-Lite Kits Released for Sale at CamJam

I went to the Cambridge Jam yesterday and was indundated with questions and people wanting to know more about the newly released Pi2Go-Lite kit for the Raspberry Pi. Now available for immediate shipping from here.


I also did a brief presentation of the development process I have been through over the last 9 months or so – starting from a mock-up made from modelling board:



And progressing through various prototypes to the final full Pi2Go prototype:



Following this prototype, we forked the project so that the full Pi2Go would be manufactured as a fully soldered mainboard using surface mount components and the Pi2Go-Lite would be a reduced feature-set product that could be hand-soldered using surface mount components.


Pi2Go (Full) Update

Now the Pi2Go-Lite kit has been released and the full Pi2Go is about to go for CE testing at an independent lab. Once these tests are passed, we can move to full production. It looks like it will be at least 6 weeks from now.


Pi2Go is now a Registered Trademark

When I arrived home from the Cambridge Lam, I found a letter containing the registration certificate for the Pi2Go trademark. Excellent timing!




PicoCon – “No Frills” Motor Controller


Picocon – The “No Frills” Motor Controller

Purchase Here


Scroll down for the assembly information for v1 of Picocon (Yellow PCB)

Assembling your PicoCon

1. Check You Have Everything


  1. PCB (Red)
  2. 3 x Screw Terminal Blocks
  3. Dual H-Bridge Chip
  4. 100nF capacitor
  5. Diode
  6. 6-pin female header
  7. 10-pin female header
  8. 26-pin female (GPIO) header


2. Start with the Diode


Ensure that the white line on the diode is facing the bottom as shown in the photo above. Solder it carefully then snip the leads off underneath


3. Add the Capacitor


This can be placed either way round. Mount it close to the PCB as shown


4. Add the H-Bridge Chip


This must be placed the correct way round or it will be damaged. Check the orientation twice before soldering!

The writing ion the chip should be correct way up when viewed as in the photo above. The little ‘U-shaped’ notch should be on the left

Click on the image above to enlarge it to see the orientation more clearly


5. Add the 2 Female Headers


It is a good idea to add these both at once as the board will rest on them on your desk fairly firmly.

Solder just one pin on each initially. Then pick up and for each header, melt the solder again while holding the header and move it until it is straight and level.

Then solder the remaining pins. It is difficult to straighten them up after more than one or two pins have been soldered, so do it at the beginning.


6. Add the 2-pin Screw Terminals


As with the female headers, add them all together so the board rests on them when soldering the first pin of each

Straighten them out before soldering the second pin, in the same way you did for the female headers


7. Finally add the GPIO Header


Make sure you add it on the bottom of the board!

Again, just solder one pin at each end then adjust until it is straight. Then solder the remaining pins


Your board should now look like this


Software for your PicoCon

1. Basic python software

  • Each motor is directly controlled by two pins, each of which drives one side of the motor
  • To make the motor go forwards, you make one pin high and the other pin low
  • To make it reverse, you make the first pin low and the second pin high
  • For the robot to go forwards both motors should be set to forwards
  • Similarly to go backwards, both motors should be set to reverse
  • If you set the left motor to forwards and the right motor to backwards, the robot will spin right
  • The (physical) pins for the left motor are 19 and 21
  • The (physical) pins for the right motor are 24 and 26
  • So to make the left motor go forwards, set pin19 high and pin21 low. You can do this in python with:
    GPIO.output(19, 1)    # pin 19 is left motor A
    GPIO.output(21, 1)    # pin 21 is left motor B

This is covered in a complete python program covered below.

2. Using the supplied python library

  • You need to import the library at the start of your python program
    import picocon
  • Then you can use the pre-defined functions for moving the motors:
  • init(). Initialises GPIO pins, switches motors off, etc
  • cleanup(). Sets all motors off and sets GPIO to standard values
  • stop(): Stops both motors
  • forward(speed): Sets both motors to move forward at speed. 0 <= speed <= 100
  • reverse(speed): Sets both motors to reverse at speed. 0 <= speed <= 100
  • spinLeft(speed): Sets motors to turn opposite directions at speed. 0 <= speed <= 100
  • spinRight(speed): Sets motors to turn opposite directions at speed. 0 <= speed <= 100
  • turnForward(leftSpeed, rightSpeed): Moves forwards in an arc by setting different speeds. 0 <= leftSpeed,rightSpeed <= 100
  • turnReverse(leftSpeed, rightSpeed): Moves backwards in an arc by setting different speeds. 0 <= leftSpeed,rightSpeed <= 100
  • To use these functions, you need to preface them with the name of module, picocon.
  • You need to call the function init() at the start of your program to setup all the input and output pins
  • You must call the cleanup() function at the end to put all the input and output pins back to where they were
  • In between you can do whatever you want, so to make the robot go forwards at a medium speed:
  • to spin left at a fast speed

Downloading the Software Library and Examples

  1. Make sure the Pi is connected to the internet
  2. From a terminal window on your Pi type the following lines exactly:
    wget -O
  3. This will create a new folder on your Pi called picocon
  4. Go into this folder and then you can run the examples like this:
    sudo python
  5. simply goes forwards, backwards, spins right and left in a loop. Press Ctrl-C to exit
  6. does the same thing but using the library (see how much simpler the code is)
  7. uses the arrow keys on your keyboard to move the robot. You can also use . or , to speed up and slow down the robot. Also use space to stop


Following information for Picocon v1 (Yellow)




The PicoCon is a very basic “No Frills” motor controller that lets you get going with robots very quickly and simply.


Assembling your PicoCon

1. Check You Have Everything


The are only 7 components to solder to the PCB:

  • L293D Dual H-Bridge chip
  • 3 x Screw Termianls 2-pin
  • Capacitor 100nF
  • 6-way Female Header
  • GPIO Header (short and long pin are provided – select which one to use)


2. Solder in the L293D


Solder the main IC – make sure pin one is in the correct place and do NOT spend too long with the soldering iron held against a pin as it may damage the chip. 2 to 3 seconds at most


3. Add the 100nF Capacitor


Add the small capacitor. It doesn’t matter which way around this goes


4. Fit the Screw Terminals


Then add the 3 screw-terminal blocks for the 2 motors and the motor power


5. Fit the 6-Pin Female Header


Connect the 6-pin I2C breakout connector (Very useful if you want to plug in the IP Display so you know the IP address of your robot)


6. Select the GPIO Header to use


If you use the extended header, then it allows you to easily access the GPIO pins not used by the Picocon itself. However, it then makes the Picocon very easy to short out and much more delicate. Choose wisely!


7. Attach the GPIO Header to the UNDERSIDE of the PCB



Finally solder the GPIO head to the REVERSE SIDE of the board. Once on, it is very difficult to remove. So make sure you get it right