A car dashboard simulation using Arduino and SimulIDE. This project implements a digital dashboard that displays speed, gear, distance, time, and music information with physical controls for acceleration and music track selection.
This project simulates a car's dashboard system using:
- Arduino UNO board
- ILI9341 TFT display
- Physical controls (buttons)
- LED indicator
- Buzzer for gear change notifications
- SimulIDE - Circuit simulation software
- Arduino IDE
- GCC compiler for the host program
- Required Arduino Libraries:
- Adafruit_GFX
- Adafruit_ILI9341
- socat (for virtual serial ports)
The simulation includes:
-
ILI9341 TFT Display connected to pins:
- CS: Pin 10
- DC: Pin 8
- RST: Pin 9
- MOSI: Pin 11
- SCK: Pin 13
-
Control buttons:
- Acceleration: Pin 2
- Next Track: Pin 5
- Previous Track: Pin 6
- LED Indicator: Pin 4
- Real-time speed display (0-180 km/h)
- Automatic gear shifting (Neutral + 6 gears)
- Distance tracking (odometer)
- Current time display
- Music player controls
- Visual and audio feedback for gear changes
- Non-blocking LED notifications
- Create virtual serial ports:
socat -d -d PTY,link=/tmp/ttyV0,raw,echo=0 PTY,link=/tmp/ttyV1,raw,echo=0- Note the two PTY endpoints created
- Update the serial port in
main.cwith one endpoint - Configure SimulIDE's serial monitor with the other endpoint
- Compile and run the host program:
gcc main.c -o carsim -pthread
./carsim- Open the simulation in SimulIDE:
- Load the circuit file
- Start the simulation
- The dashboard should now be active and responding to inputs
- Load the Arduino sketch (
sketch_oct6b.ino) to your Arduino board or simulator - Export the compiled sketch to firmware and load it in simulIDE
- Compile the host program:
gcc main.c -o carsim -pthread- Run the simulation:
./carsimThe TFT display is organized into several sections:
- Top: Current time
- Left tile: Speed and gear indicator
- Right tile: Distance (odometer)
- Bottom tile: Music information
The host program communicates with the Arduino using the following commands:
TIME|HH:MM:SS- Update timeSPEED|N- Update speed valueDIST|N.N- Update distanceGEAR|N- Update gear (N for neutral, 1-6 for gears)MUSIC|trackname- Update music trackBEEP|1- Trigger notification
- Hold acceleration button to increase speed
- Release to naturally decelerate
- Press next/previous track buttons to change music
- Gear changes happen automatically based on speed
- Speed ranges for gears:
- 0 km/h: Neutral
- 1-19 km/h: 1st gear
- 20-39 km/h: 2nd gear
- 40-64 km/h: 3rd gear
- 65-94 km/h: 4th gear
- 95-129 km/h: 5th gear
- 130+ km/h: 6th gear