I have 2 FIO's running the same code pulled from here..
http://semifluid.com/2012/09/09/arduino-fio-internal-voltmeter-and-thermometer/
// See: http://code.google.com/p/tinkerit/wiki/SecretVoltmeter
float readVcc() {
signed long resultVcc;
float resultVccFloat;
// Read 1.1V reference against AVcc
ADMUX = _BV(REFS0) | _BV(MUX3) | _BV(MUX2) | _BV(MUX1);
delay(10); // Wait for Vref to settle
ADCSRA |= _BV(ADSC); // Convert
while (bit_is_set(ADCSRA,ADSC));
resultVcc = ADCL;
resultVcc |= ADCH<<8;
resultVcc = 1126400L / resultVcc; // Back-calculate AVcc in mV
resultVccFloat = (float) resultVcc / 1000.0; // Convert to Float
return resultVccFloat;
}
I am getting way different Voltage readings.. one FIO is around 3.3v the other is around 3.18v, I have swapped batteries pack between the two units.. on is constantly lower than the other..
measuring the voltage at the 3.3 and ground pins gives me 3.29 + or - .01 on both units..
any ideas?