I am using a Raspberry Pi 3B+, Grove Base HAT for Raspberry Pi v1.0, and I2C ADC v1.2. I am trying to measure the voltage of the battery as it discharges. I would expect the voltage to continually drop. Instead I am seeing a saw tooth pattern. I am using the example code found at grove.py/grove/adc.py at master · Seeed-Studio/grove.py · GitHub. Changing the address to 0x50. I have attached a picture of the measured voltage over time. It shows a peculiar saw tooth pattern. I have verified the behavior with a voltage generator and see the same pattern with a voltage generator. I have changed out all components to verify the components are all good. How can I accurately measure voltage with these components?
I appreciate your help.