Skip to content

Hsun1031/Hsun_Battery

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Hsun Battery

This library is for ESP32

How to use?

  • begin
    • maxVolt input Volt => 3V (max: 3.3V)
    • maxBatteryVolt Battery Volt => 12V
    • return 0 -> Battery_ERROR, 1 -> Battery_OK.
begin(float maxVolt, float maxBatteryVolt);
  • getBatteryVolt
    • Get Battery Volt => (ex: 7V)
    • return Battery Volt
getBatteryVolt();
  • getBatteryPercentage
    • Get Battery Percentage => (ex: 56%)
    • return Battery Percentage
getBatteryPercentage();
  • getBatteryValue
getBatteryValue();

About

Read battery volt (ADC) for ESP32

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages