RaceCapture on Raspberry Pi

Introduction

For about $100 you can create a hardwired, dedicated dash for your RaceCapture system.

Benefits

You get all of the benefits of a dedicated dash:

  • Automatically runs upon power up - no app to launch
  • Hard-wired data connection to RaceCapture - no wireless connection to configure
  • Runs on the bare metal - the RaceCapture app runs without Android or iOS; no other apps competing for resources, or compromising system stability.
  • Overheating resistance - Your typical mobile device requires extra care to prevent damage to it's internal battery and will shut down if overheated. With proper heat-sinking, the Raspberry Pi can bypass these issues.

Experimental!

While the results are pretty great, these instructions are currently for those adventurous race car hackers who know their away around a command line, comfortable working with hardware and want to dig in.

Current status and future plans

We've created a downloadable install package for the RaceCapture app that is as close to self-running as possible on a bone stock Raspbian Jesse image - see the instructions below to start.

Upcoming, we will create a dedicated Raspberry Pi image that you can burn to an SD card and simply boot.

Hardware Selection

Raspberry Pi

For best performance, we recommend the latest Raspberry Pi 3.

Display

The RaceCapture app package is designed to recognize the following screens:

Other displays can work as well, and additional work may be needed to support the screen's touch controller.

If unsure, just pick the Official Raspberry Pi display

Installation

Installing Rasbian OS

We recommend installing Raspian Jessie Lite - download from the official site and follow the instructions for burning to an SD card.

Once you've created your image, boot up your Raspberry Pi and log in with the default username of 'pi' and password 'raspberry'.

Installing dependencies

Change the default password

For maximum security, change the password for the default user 'pi'

> passwd

and specify a new, secure password.

Configure Raspberry Pi base settings

Enable WiFi

Enable and configure WiFi per the official documentation

(Optional) Enable SSH

You can optionally enable SSH for remote management from the comfort of your main computer's keyboard and screen.

Enable and configure ssh per the official documentation

Install multi-touch tools

Install the packages that enable multi-touch interfaces.

> sudo apt-get install mtdev-tools

Configure memory split

You'll need to bump up the memory made available to the GPU. Increase the default value of 64 to 256.

  • Via raspi-config tool

You can adjust the memory split by running the raspi-config tool. See the official documentation

  • Editing /boot/config.txt

You can adjust the value directly by editing the /boot/config.txt file.

> sudo nano /boot/config.txt

Find the line containing gpu_mem=64 and change the number to 256

gpu_mem=256

Save the file by pressing ctrl-x then press Y to confirm.

Installing the RaceCapture app package

Download the latest RaceCapture app package and place it in the /opt/ directory of the Raspberry Pi.

  • Directly downloading to the Raspberry Pi

You can download it directly by getting the URL of the package by right-clicking the download link and copying the URL to your clipboard. Then, use it in the command below:

cd /opt
sudo wget <package URL>

Extract the package

Now extract the downloaded package :

sudo tar -xjvf <downloaded file>

Launch the app

Launch the RaceCapture app by running the following command:

/opt/racecapture/run_racecapture.sh

Launching with Watchdog

You can enable an automatic watchdog that re-launches the app in case a crash occurs.

/opt/racecapture/run_racecapture.sh -w 1
  • Note: to break out of the watchdog loop, press ctrl-z to suspend the app, then issue:
killall -9 run_racecapture.sh

Automatic start upon power up

To get the full dedicated dashboard experience, you can enable automatic launch of the RaceCapture app upon power up.

To do this, edit the system's startup file:

sudo nano /etc/rc.local

and add the following line before the exit 0 line.

/opt/racecapture/boot_racecapture.sh pi

exit 0

Save the file by pressing ctrl-x then press Y to confirm.