How to Measure TinyZero Battery Percent?

Started by bibletech55, April 07, 2025, 08:02:17 PM

Previous topic - Next topic

bibletech55

**
Jr. Member
Posts: 9
Roger roger - all 120 marching battle droids.
Logged
Hi there!

I have a TinyZero connected to a small LiPo battery. I would like to read the current capacity of the battery to the Serial Monitor. Since the board is based off of the Arduino Zero (and by extension, the MKR Zero), I sought to read the value of ADC_BATTERY and convert this value to my voltage reading. The following tutorial shows how to measure battery voltage using an MKR Zero. (https://projecthub.arduino.cc/Arduino_Genuino/mkr-zero-read-battery-voltage-e31f42)

When verifying the code for the TinyZero, I receive an error that tells me that ADC_BATTERY is not defined in this scope. However, if I verify the exact same code for an MKR Zero, I receive no compilation errors. Since they use the same processor (SAMD21), wouldn't both boards have an ADC_BATTERY pin, and potentially be able to use ADC_BATTERY the same way?

Thank you for any help!

Christian Martin

*
Newbie
Posts: 0
Logged
Check the official documentation or the schematic of TinyZero provided by TinyCircuits. It may indicate which ADC pin (if any) is connected to the battery or is intended to measure voltage. It sounds a bit like a headache. If you have time, you can tryUno Online Free. This game has beautiful graphics and is also very entertaining.

SMF spam blocked by CleanTalk