This is a small example sketch that simulates a cars ecu. I copied the base code from instructables user mviljoen2.
- 0x00: SupportedPID
- 0x01: MilCleared
- 0x05: Coolant Temperature in on Celsius
- 0x0C: RPM
- 0x0D: Vehicle Speed
- 0x0F: Intake Air Temperature
- 0x10: MAF Value
- 0x46: Ambient Air Temperature
- 0x3C: Catalytic converter Sensor1
- 0x3D: Catalytic converter Sensor2
- 0x3E: Catalytic converter Sensor3
- 0x3F: Catalytic converter Sensor4
- sends value back on request
- configuration of first 0 to 20 pids
- correct input values
this example uses the Seeed Studio library
- Seeedstudio CAN-BUS Shield V1.2 wiki github
- Sparkfun CAN-BUS Shield github