How do I read the internal reference voltages of the Arduino (Ardino Mega, ATmega2560, specifically the 2.56v reference) with respect to the input voltage?
I'm trying to measure the remaining battery capacity of a device through a voltage divider. The Vcc going into the Arduino is also hooked up to the battery and thus varies as well. I've measured the internal 2.56v reference so I know approximately what it should be regardless of the varying Vcc voltage but I can't find any simple documentation on exactly how to measure that particular internal reference voltage with respect to the Vcc.