Categories
Uncategorized

Monk Makes Pi Rover on Bullseye

We bought one of these very nice kits cheap from eBay, and then found why they were going cheap. Whislt the construction and components are tip-top, the construction video linked to from the included paper documentation no longer exists, which wasn’t a massive problem, there are not many parts and you can tell from the pictures how it goes together.

Slightly harder to figure out, when we came to installing the libraries and example code on a recent Pi O/S (Raspbian Bullseye) we had problems because the code was written for Python 2 and only Python 3 is shipped with the O/S.

This is what we did to get Python 2 installed and the example code working with the Rover. Please note that this may stop other things which rely on Python 3 from working so use a newly installed O/S on a new microsd card

This guide assumes that you have a Raspberry Pi (we used a 3B+) with a newly installed Raspbian Bullseye, connected to the network, logged in via ssh with the user pi. We didn’t install an O/S with a Graphical Desktop Environment, just the 32bit version of Raspberry Pi OS Lite (Bullseye). Unless you are connecting via a LAN cable, don’t forget to edit the files in /boot to enable wifi on first boot.

Once connected to your Pi and logged into the pi account, from the CLI type:

sudo apt install python
python --version

The last command should output the version, which should be 2.7 or something in the 2 range anyway. Now Python 2 should be the default Python interpreter when running Python code from the command line.

We need PIP for Python 2 to install the RPi.GPIO library

curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py
sudo python2 get-pip.py
pip --version

Again, this should tell you that it is PIP version 2.something.

We also need python-dev before installing the RPi.GPIO library.

sudo apt-get install python-dev-is-python2
sudo pip install RPi.GPIO

Now we can install the libraries by Simon Monk.

cd
git clone https://github.com/simonmonk/raspirobotboard3
cd raspirobotboard3/python
sudo python setup.py install
cd
git clone https://github.com/simonmonk/squid
cd squid
sudo python setup.py install

Now we can install and run the example code from Tekno Teacher.

cd
git clone https://github.com/teknoteacher/raspirobot3
cd raspirobot3
ls -l
sudo python 02_rgb_fade.py

We tested most of the examples and the ones we tested worked just fine.