ESP32 firmware for the steering-wheel HMI.
The board sends driver IO on CAN. The display shows various data about the cars modes, speed, bms, etc. The odometer value is stored in NVS.
Repository origin: This Car 2.5 repository was created from the
v2.0.00tag of the originalbadgerloop-software/sc2-steering-wheelrepository. The starting commit is445536f.
- Run
git submodule update --init. - Run
pio run.
main.cpp starts these FreeRTOS tasks:
| Task | Core | Rate | Role |
|---|---|---|---|
ioTask |
0 | 100 Hz | Read pedals and buttons |
canRxTask |
0 | about 1 ms | Read BMS and telem frames |
canTxTask |
0 | 50 Hz | Send driver inputs |
displayTask |
1 | 20 Hz | Update odometer and TFT |
IOManagementreads pins, sets pedal scale, toggles buttons, and counts laps.canSteeringreceives BMS, speed, and fault frames. It sends0x300through0x304.displaydraws the UI.odometerstores tenths of a mile in NVS.
Transmit:
0x300digital pack0x301regen0x302throttle0x303eco or power mode0x304hazards
Receive:
0x108and0x109BMS0x208mph from the PDC0x001BPS fault from powertrain (0x01means fault)
| Function | Pin |
|---|---|
| Throttle ADC | 12 |
| Regen button | 35 |
| Left blink | 34 |
| Right blink | 5 |
| Direction | 32 |
| Horn | 33 |
| Hazards | 14 |
| Drive mode | 4 |
| Lap increment | 26 |
| Lap decrement | 27 |
| CAN TX | 21 |
| CAN RX | 22 |
| TFT CS | 15 |