Gathers telemetry via CAN BUS from a Haltech ECU and writes to a file.
Eventually, this data will be transmitted via APRS using Direwolf.
- Raspberry Pi Zero 2W (with headers)
- Waveshare CAN Hat
- Python 3.9+
- Python dependencies are declared in pyproject.toml. To install runtime dependencies:
- On Raspberry Pi OS
sudo apt install python3-can
- Using pip:
- Runtime only:
pip install . - Development (adds Black):
pip install -e .[dev]
- Runtime only:
- On Raspberry Pi OS
- Add the following lines to your Raspberry Pi boot config (
/boot/firmware/config.txt), then reboot.dtparam=spi=on dtoverlay=mcp2515-can0,oscillator=12000000,interrupt=25,spimaxfrequency=1000000
./startup.sh
This will write the data to a file, telemetry_data.csv, with a single line of values.
Feel free to modify this to suit your needs; I only want the latest values for parsing using
Direwolf to send via APRS.
coolant_temp_celsius,oil_temp_celsius,fuel_level_gallons,abs_error,check_engine
15.35,20.55,2.91,False,False
- Waveshare documentation and sample project (the basis for this repo).
- Haltech ECU CAN broadcast protocol
- Haltech CAN protocol specification