Quote:
Originally Posted by Theitguy
where you have "analogin > 120" is this your voltage value??
|
The 10-bit representation of it, yes. When you run
analogRead(pin#), it uses the ATMEGA's ADC to measure the voltage of that pin as a 10-bit (0-1023) value.
Here's the resistor layout I used:
http://ecomodder.com/forum/showthrea...tml#post227420
You'll want to set the if{} values half way between the nominal analogRead values. In the case of the schematic you attached: 70, 240, 415, 620 and 880 would be good middle-values.