The PDU1800 ist the PI Display Unit 1800 for Assetto Corsa, a tremendous Race Simulation from Kunos. It acts as a dashboard using the Watterott RPi Touch-Display.
I published two videos, that will show you how it works on the pi. I will publish another one once I have installed it on my wheel:
- Youtube: Ingame (LaFerrari at Spielberg South)
- Youtube: Simulation 1
- Youtube: Simulation 2
Note, that it is necessary to use shared memory, the API and the UDP Server, to get all the data, that I want to show on the display.
If you look into the Assetto Corsa Forums, you will find awesome dashboards, as ingame app, for smartphones, browsers or to build your cockpit using Arduino hardware. Honestly, there is no need for another dashboard. I am more interested in the act of creating something new. I've never done a Game Plugin and, although I use Python at work daily, I've never done anything graphical with pygame or interfaced with C-programs directly. So the technical challenge was also interesting for me.
I actually spend far more hours in Assetto Corsa programming my PDU1800 than driving, which may be the reason I always see this funny blue flags while racing....
The PDU1800 consists of two components:
- The Raspberry Pi Display
- The PDU1800 Data Provider which is a standard Assetto Corsa Plugin
See the Wiki for installation instructions for the PDU1800 on the Raspberry and the Readme of the PDU1800 Data Provider.
If you exit a driving session and let the dashboard run, the UDP Telemetry Reader needs to be reinitialized. Just touch the display a click on "Restart". This will reinitialize the Telemetry Reader and the fuel calculation.
The PDU1800 Data Provider is a Assetto Corsa Python Plugin. It collects the necessary data using Rombiks siminfo.py and the PythonAPI for the Delta Time. All data is collected, converted into a hash, pickled and sent to the Pi with UDP. The data provider can show a debug window with the current collected data.
The PDU1800 is also written in Python (2.7) and pygame. I extracts the data, hands it over to a specific widget (eg the LapTimeWidget) which takes care of displaying the data. The touchscreen shows the current IP of the Pi - necessary to configure the data provider - and can be used to quit the application of the shutdown the whole pi.
The PDU1800 has been developed on a Mac and been tested on a PC - no need for a Pi. To develop, just install a python 2.7 interpreter with pygame. If you just start the main.py
, you should be presented with a working PDU1800 on the screen, which uses a collected datastream pdu1800_datastream.json
. If you want to collect your own datastream, just set the raspberry_ip
in the pdu1800_data_provider/config.ini
to the ip of your PC/Mac and start the datastream.py
which will create a new pdu1800_datastream.json
.
It's all python, so adapt it if necessary.