Page 1 of 1

Obd can to analog converter

Posted: Mon Apr 10, 2017 11:38 pm
by Jchidley
Using the can shield, how does one do this? I would like to pull some data and convert it to voltage for some gauges.

Re: Obd can to analog converter

Posted: Mon Apr 17, 2017 10:57 am
by darrellg
Read the value from the CAN bus, then use analogWrite() to PWM the gauge. In between, you can use the map() function to scale the value.

https://www.arduino.cc/en/Reference/AnalogWrite
https://www.arduino.cc/en/Reference/Map