🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Battery status?

    Scheduled Pinned Locked Moved M5 Stick/StickC
    core
    2 Posts 2 Posters 6.9k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J Offline
      JoaoB
      last edited by

      Hi, is there any way to know the battery percentage of the M5Stick-C? I want to know when its "fully" charged and what is the real-time percentage of the battery!

      Thanks

      1 Reply Last reply Reply Quote 1
      • O Offline
        OnRed
        last edited by

        I've just started out but it looks like the following shows the voltage and mine maxed out at 4.178V, this gradually decreases and I think below 3.6V isn't really usable. You can use this and some testing to determine the percentage of battery.

        #include "M5StickCPlus.h"
        
        TFT_eSprite Disbuff = TFT_eSprite(&M5.Lcd);
        
        void setup() {
            M5.begin();
            M5.Axp.ScreenBreath(8);
            M5.Lcd.setRotation(1);
        
            Disbuff.createSprite(240, 135);
            Disbuff.setTextColor(TFT_WHITE);
        }
        
        void loop() {
            Disbuff.fillRect(0, 0, 240, 135, TFT_BLACK);
            Disbuff.setCursor(10, 10);
            Disbuff.printf("BAT_V: %.3fV",M5.Axp.GetBatVoltage());
            Disbuff.pushSprite(0,0);
        }
        

        There are other options power functions that may help in this doc:
        AXP192 (Power management)

        Good luck.

        1 Reply Last reply Reply Quote 0

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • First post
          Last post