How to measure a resistor with the Arduino analog sensor?