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

    M5Dial backlight control / dimming?

    Arduino
    2
    3
    348
    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.
    • E
      ELaw001
      last edited by

      Are there any functions (and/or code examples) available in the Arduino libraries to dim or turn on/off the backlight on the M5Dial?

      I've tried M5.Lcd.setBrightness and M5Dial.Lcd.setBrightness... both compile, but don't seem to do anything.

      Thanks!

      felmueF 1 Reply Last reply Reply Quote 0
      • felmueF
        felmue @ELaw001
        last edited by

        Hello @ELaw001

        please have a look at this example here using encoder to dim the backlight.

        Thanks
        Felix

        GPIO translation table M5Stack / M5Core2
        Information about various M5Stack products.
        Code examples

        E 1 Reply Last reply Reply Quote 0
        • E
          ELaw001 @felmue
          last edited by

          Hey thanks!

          So... funny story... I tried the sketch you linked and it worked fine. Then I tried calling the M5Dial.Display.setBrightness function in my sketch, and it did nothing regardless of what number I passed to it.

          Long story short, I'm using Bodmer's TFT_eSPI library in my sketch and I had TFT_BL defined in the user config file. It seems that defining that makes the TFT_eSPI library take over the backlight control pin and stops the setBrightness function from working. Commenting out the setting of TFT_BL in that config file made the function work.

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