I am trying to use this way to measure my battery voltage at least approximately, but I am getting weird results.
I am running breadboard atmega328p with internal 8 MHz and powering it from a LiPo battery that is above 4V when fully charged. The battery is connected straight to GND and VCC pins.
Yet the readVcc function returns values around 3100 mV. The wADC returns values around 367.
Dou you have an idea what might be the problem please?