Hi,
I want to measure the battery level on a WIFI1010 that is on a IotCarrier.
the IoT carrier has a litium battery in it.
So I came to the folowing code:
float readBatteryVoltage() {
analogReference(AR_EXTERNAL);
analogReadResolution(10);
float sensorValue = analogRead(ADC_BATTERY);
return (sensorValue * 4.208) / 1023.0;
}
However, the sensorValue is always 1023,
so there seem to be something wrong,
and I cannot get where the issue actually is.
any idea?
--
Renaud