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

    Detect When M5 is Powered by Battery?

    PRODUCTS
    2
    3
    3.8k
    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
      jeremyjh
      last edited by

      I know we can’t read the charge level on the M5 core, but is there any way to detect if the power source is battery vs USB? Even adding some custom circuit?

      1 Reply Last reply Reply Quote 0
      • lukasmaximusL
        lukasmaximus
        last edited by

        @jeremyjh There are sample programs for this. Do you want arduino code or micropython?

        J 1 Reply Last reply Reply Quote 0
        • J
          jeremyjh @lukasmaximus
          last edited by

          @lukasmaximus Thanks so much for your reply! Sorry I missed it. I found the Arduino sample and confirmed it works. Somehow I had been led to believe from issues on Github that it was only supported on Fire, but the battery sample works on my M5 Basic (black).

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