Hi everyone, I have a simple but annoying problem here, if you help me solve this thing out, I’ll give you 20$ as a tip.
In short, I have a Pimoroni Pico Lipo with a regular lipo battery, the only thing I wanna do is to measure the battery percentage, but the outcome is abnormal. Here’s the code:
from machine import ADC
voltageInput = ADC(29)
voltageConversionFactor = 3 * 3.3 / 65535
voltage = voltageInput.read_u16() * voltageConversionFactor
print(voltage)
The code above will print something like 0.20 in the shell, which is far away from 3.3 - 4.2V.
The Pimoroni Offical also provided a demo code to measure the battery percentage, but that will print -185% on my Pico, which is far away from 100%.
I spent hours on this problem and tried everything I can. I also notice a previous post which has a similar problem. That user got -194% as result when he tried to measure the battery.
Is this a hardware design flaw?? I’m totally confused, any explain helps, thanks!