TinyCircuits Forum

TinyCircuits Products => TinyDuino Processors & TinyShields => Topic started by: varotodfc on October 06, 2020, 08:33:01 PM

Title: read the status led for the battery
Post by: varotodfc on October 06, 2020, 08:33:01 PM
Hi everyone,

I wonder if there is a command to access the status of the led that indicates if the battery is charging or not and what is the name of that LED. 

For example:

Code: [Select]
digitalRead(LED_name)
Title: Re: read the status led for the battery
Post by: lennevia on October 07, 2020, 02:04:00 PM
I believe I may have personally emailed you, but I will post the answers to your questions here for all forum users to see.

It depends on the processor board.

For the TinyZero – there isn’t a way to read the status due to the charging LED being encapsulated in a circuit with the voltage regulator.

For the TinyDuino – you would need to read the voltage of the processor and determine from there whether it is charging or not.

The TinyScreen+ is similar to the TinyDuino, and we have a ready-made tutorial for the TinyScreen+ and how to display the battery voltage if you are interested in knowing the state of charge of a TinyScreen+: https://learn.tinycircuits.com/Help/TinyScreenPlus-Battery-Voltage-Tutorial/ Just note that this tutorial only works for the TinyScreen+.