Formula Pi SD card image - Monster series
Please note that most of the installation steps will expect the Raspberry Pi to be connected to the internet.
We recommend using a Raspberry Pi 3 as that is what will be fitted in the MonsterBorgs.
Basic Raspbian image
The standard image is based on the official version of Raspbian.
We have tested using the 27th of May 2016 version: http://downloads.raspberrypi.org/raspbian/images/raspbian-2016-05-31/
We recommend following the install guide here.
We also recommend expanding the filesystem using raspi-config
:
- Enter the following command in a terminal:
sudo raspi-config
- Move down to option
1 Expand Filesystem
and press ENTER - Move right until
Finish
is highlighted, then press ENTER
Installing the ThunderBorg
First enable I2C using raspi-config
:
- Enter the following command in a terminal:
sudo raspi-config
- Move down to option
8 Advanced Options
and press ENTER - Move down to option
A7 I2C
and press ENTER - Make sure
Yes
is highlighted and press ENTER - When the dialog says I2C is enabled press ENTER
- Make sure
Yes
is highlighted again and press ENTER - When the dialog says I2C will be loaded by default press ENTER
- Move right until
Finish
is highlighted, then press ENTER
If the I2C option is not available simply proceed to the next step.
To run through the automatic installer just use this one line in a terminal:
bash <(curl https://www.piborg.org/installer/install-thunderborg.txt)
If you would prefer to manually run through the steps use the commands below:
mkdir ~/thunderborg cd ~/thunderborg wget http://www.piborg.org/downloads/thunderborg/examples.zip unzip examples.zip chmod +x install.sh ./install.sh
Setting up the camera
After powering the Raspberry Pi you want to enable the camera functionality:
- Enter the following command in a terminal:
sudo raspi-config
- Move down to option
5 Enable camera
and press ENTER - Make right until
Enable
is highlighted and press ENTER - Move right until
Finish
is highlighted, then press ENTER - If asked if you would like to reboot, make sure
Yes
is highlighted, then press ENTER - Wait for the Raspberry Pi to restart
You can check the Raspberry Pi camera is attached and working by using the following command:
raspistill -d
If the camera is working you should see the image from the camera on the monitor for a few seconds.
If it is not working or incorrectly connected you will get error messages instead.
Next we want to install the Python library for talking to the camera:
sudo apt-get -y install python-picamera
As we want to do image processing we want the OpenCV libraries as well.
This download is a bit larger and may take a while:
sudo apt-get -y install libcv-dev libopencv-dev python-opencv
Final notes
We will download and unzip your code into the /home/pi/formulapi
directory.
We will add this line into rc.local
to start the code:
sudo python /home/pi/formulapi/Formula.py &
This means you will need a Python script called Formula.py
as the starting part of your code.
This will be how our standard example works, with Formula.py
loading all of the other scripts.
If you wish to use a language other than Python you may, but it must be started from the command in rc.local
listed above.
If your code will not run on our standard image you will need to provide a pre-setup micro SD card which will work with the Raspberry Pi 3 and will start up into a waiting for lights state on its own.
It will also need to access the /colours.txt
file we write to the card and set the RGB values from the first line to the ThunderBorg LEDs (see the rules for more details).
Comments
dinotoo
Sun, 22 Oct 2017 - 18:53
Permalink
raspbian-2016-05-31 & winter series 2017 > Still use this image
Hi, do you plan to stay on this image or to switch to another for winter series ?
dinotoo
Arron Churchill
Sun, 22 Oct 2017 - 19:59
Permalink
Raspbian image
The base image of Raspbian is a little old now, however we are planning to stick with it for this season,
Newer images will probably work fine, but we would want to do some proper testing before changing all of the SD card images in case there are any problems.
In the longer term we will probably update to a newer version of Raspbian for the new Raptor class. We will then use the same version for future Monster class images. This should give us plenty of time to check if there are any differences / problems and get them all fixed :)
dinotoo
Sun, 22 Oct 2017 - 20:02
Permalink
Rasp image
Ok, thanks for the answer
dinotoo
Sun, 22 Oct 2017 - 20:15
Permalink
Image & apt-update
Is an apt-get update is launched on the rpi ?
Arron Churchill
Sun, 22 Oct 2017 - 23:00
Permalink
apt-get update
Yes, the ThunderBorg installation runs
sudo apt-get update
at the start of the software setup.Add new comment