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

    How to restore display after M5.Axp.SetSleep() with code?

    Scheduled Pinned Locked Moved M5 Stick/StickC
    4 Posts 2 Posters 9.9k Views 1 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.
    • V Offline
      vvs551
      last edited by

      There is display off after M5.Axp.SetSleep()
      How to restore (or reset) display from code after that, f.e. when button is pressed?

      1 Reply Last reply Reply Quote 0
      • V Offline
        vvs551
        last edited by

        I am already detect that M5.Axp.begin() can help to restore the display

        1 Reply Last reply Reply Quote 0
        • R Offline
          ricardocosta
          last edited by ricardocosta

          How did you manage to use M5.Axp.SetSleep()?
          I have the latest library installed (0.0.5) in Arduino, included AXP192.h and I get the error:

          'class AXP192' has no member named 'SetSleep'
          

          What am I missing?

          Note: using M5StickC

          V 1 Reply Last reply Reply Quote 0
          • V Offline
            vvs551 @ricardocosta
            last edited by vvs551

            @ricardocosta
            void AXP192::SetSleep(void){

            Wire1.beginTransmission(0x34);
            Wire1.write(0x31);
            Wire1.endTransmission();
            Wire1.requestFrom(0x34, 1);
            uint8_t buf = Wire1.read();
            
            buf = (1<<3)|buf;
            Wire1.beginTransmission(0x34);
            Wire1.write(0x31);
            Wire1.write(buf);
            Wire1.endTransmission();
            
            Wire1.beginTransmission(0x34);
            Wire1.write(0x12);
            Wire1.write(0x41);
            Wire1.endTransmission();
            

            }

            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