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

    M5 Stick/StickC
    2
    4
    8.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
      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
        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
          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
            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
            • First post
              Last post