🤖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?

    Scheduled Pinned Locked Moved PRODUCTS
    3 Posts 2 Posters 4.5k Views 2 Watching
    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
      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 Offline
        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 Offline
          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

          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