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:

  1. Enter the following command in a terminal: sudo raspi-config
  2. Move down to option 1 Expand Filesystem and press ENTER
  3. Move right until Finish is highlighted, then press ENTER

Installing the ThunderBorg

First enable I2C using raspi-config:

  1. Enter the following command in a terminal: sudo raspi-config
  2. Move down to option 8 Advanced Options and press ENTER
  3. Move down to option A7 I2C and press ENTER
  4. Make sure Yes is highlighted and press ENTER
  5. When the dialog says I2C is enabled press ENTER
  6. Make sure Yes is highlighted again and press ENTER
  7. When the dialog says I2C will be loaded by default press ENTER
  8. 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:

  1. Enter the following command in a terminal: sudo raspi-config
  2. Move down to option 5 Enable camera and press ENTER
  3. Make right until Enable is highlighted and press ENTER
  4. Move right until Finish is highlighted, then press ENTER
  5. If asked if you would like to reboot, make sure Yes is highlighted, then press ENTER
  6. 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

Hi, do you plan to stay on this image or to switch to another for winter series ?

dinotoo

Arron Churchill's picture

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 :)

Ok, thanks for the answer

Is an apt-get update is launched on the rpi ?

Arron Churchill's picture

Yes, the ThunderBorg installation runs sudo apt-get update at the start of the software setup.

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd> <pre>
  • Syntax highlight code surrounded by the <pre class="brush: lang">...</pre> tags, where lang is one of the following language brushes: bash, cpp, perl, python.
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.