read the status led for the battery

varotodfc

  • Newbie
  • *
    • Posts: 2
    • View Profile
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)


lennevia

  • Administrator
  • Hero Member
  • *****
    • Posts: 437
    • View Profile
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+.


 

SMF spam blocked by CleanTalk