About a year ago, I received a 4tronix Initio robot with a Pirocon Raspberry Pi add-on board.
Recently, I have managed to get it to work with a Nintendo Wii Remote.
The first step when you get the robot is to assemble it. Personally, I found this fairly easy with a little bit of help from family members. All you have to do is build the platform using screws to secure it in place. Attaching the Pi itself to the platform was easy and so was attaching and connecting up the Pirocon add-on board itself.
I then inserted batteries and powered on the robot. This went perfectly. I then simply installed the library (after installing Raspbian) and attempted to run the example code. This is where I ran into issues. My wheels were spinning but with very little power. I then put the robot onto laminate floor but this didn’t help.
It was only recently that I discovered the problem. Firstly, it is always a good idea to read warning messages before using a product! Here is the warning message on the 4tronix website for the Initio robot:
This is a screen clipping taken from http://4tronix.co.uk/blog/?p=169
The problem was partially due to the jumper wire being set in the wrong position (it was set to the left rather than the right). I also knew that my batteries might be causing a problem due to the fact that I was using cheap ASDA Low Power Alkaline batteries! I was originally planning to use disposable batteries with my robot. I had just realised that this wasn’t possible. However, I decided to give Duracell disposable batteries a go (I will eventually get rechargeable batteries). However, once I got home from getting the batteries, I realised the Duracell batteries were alkaline batteries! Despite this, they work extremely well.
The next stage was to connect my Wii Remote to my Raspberry Pi. Firstly, I got a Bluetooth dongle. I own a Nintendo Wii so just used an existing Wii Remote that I owned.
Nintendo Wii communicate with Wii Remote’s via Bluetooth. Someone made a library to allow the Raspberry Pi to interact with Wii Remote’s. Please click here to see the excellent tutorial that I followed to make this project possible.
I then combined the example script from the Raspberry Pi Spy (see link above) and the ‘motorTest.py’ script from 4tronix. I did this by using SSH. This was fairly easy. One thing to note is that you MUST place your newly created script inside the ‘initio’ folder. Otherwise, the script will not work.
When I tried out the script and everything worked.
My next step for this project is to integrate my HC-SR04 ultrasonic range finder. This would autonomous control. I have already tried out my HC-SR04 with my Pirocon board already and it works. I just need to integrate it into my robot script.
Please follow me on Twitter (@bungleofhay) to be automatically notified when I publish part 2 of this project. Otherwise, watch this space.