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

    ATOM Matrix leds blink very shortly at random (solved by workaround)

    Arduino
    4
    5
    9.5k
    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.
    • K
      kosternet
      last edited by kosternet

      Hi there everone,

      I have a ATOM matrix. I program it using the Arduino IDE.

      I created a program that makes a webserver out of the ATOM. This all works fine.
      When I call a special URL the screen changes to a color with the following code:

      void showGreen(){
      M5.dis.clear();
      for(int i=0;i<=24;i++){
      M5.dis.drawpix(i, 0xff0000);
      }
      color="Green";
      }

      However, when I run the program, the screen is indeed changed to green, BUT the screen keeps flashing every second or so where the color changes for just a split-second and then changes to the correct color.

      Anyone has any idea what can be causing this?

      Hope to hear from you soon,
      Geert

      1 Reply Last reply Reply Quote 0
      • R
        robalstona
        last edited by

        I also noticed a short blinking screen when using the cleaning function, or when showing previously set pixels. If the screen flashes to you every second, it means that somewhere in the program the content of the matrix is ​​updated. Look for a function called m5.dis.show() or similar somewhere in the code. Maybe you don't need to refresh the matrix all the time, but you only need to change the color once. I am coding in the micropyton but the names and functionality of the functions overlap with those of arduino. I also noticed that during continuous animation random pixels can flash in red or blue.

        1 Reply Last reply Reply Quote 0
        • lukasmaximusL
          lukasmaximus
          last edited by

          You can also use the fastled library to control the LEDs, I didn't notice any flashing when I used it

          1 Reply Last reply Reply Quote 0
          • hagueH
            hague
            last edited by

            Hi,
            I also never saw any flickering, but I used the M5.dis.displaybuff() method with predefined patterns.
            You can check the code here: https://github.com/electricidea/M5ATOM/tree/master/Tilt-Game

            Hope that helps.
            Hans-Günther

            1 Reply Last reply Reply Quote 0
            • K
              kosternet
              last edited by

              Hi @robalstona , @lukasmaximus and @hague ,

              First of all, thanks for your very quick response! I found out what seems to be the problem;

              I was using the M5Atom.h to control the leds, and somewhere in the M5.Update() the flickering sometimes occurred. The problem was indeed solved using the fastled library. The device works exactly as I was hoping now.

              For this I needed to remove M5Atom.h, because indeed some functions and variables overlap.

              Thanks again for pointing me in the right direction.

              Greetings from a very happy Geert :-)

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