ATOMS3 Screen Backlight → Want to Switch OFF



  • Hello Here,
    In order to only use my AtomS3 for a BLE application and connect it via USB-C to a small battery, I'd like to cut the backlight completely in order to save energy and tiny heat when long time ON, ∆ and also use an OTII-ARC tool to measure the consumption of my program and the AtomS3 in this BLE advertising mode,

    • without over-consumption due to the fact that the backlight is always ON - even if the pixels are black.
      I understand that the lcd is a N085-1212TBWIG06-C08 ; on the M5STICK and M5STICKplus I was able to cut the screen with the following code: (thanks community)

    *void turnOffScreen() {
    // try to turn off screen - https://community.m5stack.com/topic/1025/m5stickc-turn-off-screen-completely/11
    // OK
    Wire1.beginTransmission(0x34);
    Wire1.write(0x12);
    Wire1.write(0b01001011); // LDO2, aka OLED_VDD, off
    Wire1.endTransmission();

    // not tested
    /M5.begin(0,1,1);
    M5.Axp.SetLDO2(false);
    M5.Axp.SetLDO3(false);
    /

    //M5.Lcd.setBrightness(0);
    //M5.Axp.ScreenSwitch(false);
    }*

    The reason I'm here is that this code doesn't work on the ATOMS3 and I haven't figured out how to do it yet.
    Can you help me?
    Thank you in advance

    • Tyler


  • Hello @hugo-reed

    according to the M5AtomS3 documentation the backlight is connected to GPIO16. So setting that to LOW should turn it off. (Note: not tested)

    digitalWrite(16, LOW);
    

    Note: GPIO16 gets initialized and set to HIGH in function M5Display::begin().

    Thanks
    Felix



  • Alternatively - using M5Unified you can also call:

    M5.Display.sleep();

    To wake it up again use:

    M5.Display.wakeup();