Originally Posted by H-Man
Is there any reason I wouldn't be able to add some code to do an analog read of my dashboard lamp rheostat voltage and have the micro controller adjust PWM based on dashboard brightness?
Hardware-wise, you'd have to add a voltage divider to condition your instrument panel lighting signal to be less than 5VDC, then feed it to one of the analog input pins. You'd want to also add a 5 VDC Zener diode to the pin for circuit protection. The circuit would look similar to this:
The resistor values would have to be adjusted, but that should be easy enough to do.
Software/Arduino-wise, this capability could easily enough be added in. My code already has analog input reading capability built into it - not sure if the original DCB 0.86 (or earlier) code would allow/accept Analog library calls. I'd just have to provision in a way of assigning an unused analog pin for use with brightness.
I got the analog gauge driver code added in, but haven't been able to find any time to test it.