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

    Fire getBatteryLevel()

    M5Stack Fire
    2
    2
    2.3k
    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.
    • V
      Veto6017
      last edited by

      Hi,

      I'm trying to read the battery level from a Fire controller but even the init code is not working. Is this function not supported for Fire controllers? In the schematic I see that a IP5306 power controller is used in the hardware. So I don't understand why canControl() returns false.

        M5.begin(); 
        M5.Power.begin();
        if (M5.Power.canControl()) {
          Serial.println("Power canControl OK");
        } else {
          Serial.println("Power canControl ERROR");
        }
      

      I'm always getting the ERROR message.

      Thanks, Roger

      1 Reply Last reply Reply Quote 0
      • felmueF
        felmue
        last edited by

        Hello @Veto6017

        hmm, with an M5Stack Fire (HW: 2018.2A) running your code I get "Power canControl OK".

        Have you tried to run I2C_Tester.ino? The I2C scan finds 0x10 (BMM150), 0x68 (MPU6886) and 0x75 (IP5306).

        Thanks
        Felix

        GPIO translation table M5Stack / M5Core2
        Information about various M5Stack products.
        Code examples

        1 Reply Last reply Reply Quote 0
        • First post
          Last post