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

    Has anyone figured out a good way to update the display quickly?

    FAQS
    5
    8
    23.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.
    • J
      joeybab3
      last edited by

      I have my display showing a constantly updating number, but this number doesn't ever get erased which makes it really hard to read after a short while.
      I tried setting the whole display to black before doing each number but it creates a rolling effect...

      JJJ 1 Reply Last reply Reply Quote 0
      • JJJ
        JJ @joeybab3
        last edited by

        @joeybab3 Hi Joey,

        This twitter user seems to have it working.......
        https://twitter.com/ksasao/status/970196248836755456

        0_1520926062432_d60dfa1c-0589-4e68-bc06-82e52d4e2106-image.png

        1 Reply Last reply Reply Quote 0
        • on4aaO
          on4aa
          last edited by on4aa

          Personally, I have been experimenting only with smaller fonts and multiple lines of text of which only one line requires updating. If this is the case, I first clear the dynamic line with \r and then write the updated string. This happens much quicker than clearing all pixels of the screen.

          Having said that, I am surprised that I cannot reliably clock the ILI9341TFT driver chip at speeds higher than 2.6MHz, whereas the spec sheet states that clock speeds up to 10MHz should be supported. Many outside the M5Stack scene even successfully overclocked this chip in many instances.

          So, I am really wondering whether the M5Stack contains a genuine ILI9341, or is it the TFT screen itself which is really slow or what else could be wrong?

          Serge — http://hamwaves.com/iot/

          world101W 1 Reply Last reply Reply Quote 0
          • world101W
            world101 @on4aa
            last edited by

            @on4aa 在 Has anyone figured out a good way to update the display quickly? 中说:

            If this is the case, I first clear the dynamic line with \r and then write the updated string. This happens much quicker than clearing all pixels of the screen.

            @on4aa, Can you please provide example code of the above?

            I have been experimenting with text quite a bit as well. I first was drawing a rectangle the same color as the background approximately the same size as the text, before writing the line of text. But I think this would have the same rolling effect as @joeybab3 was saying under fast update situations.

            @joeybab3, another suggestion is to provide the background color while defining the text color. Did you try that?

            M5.Lcd.setTextColor(TFT_BLACK,TFT_WHITE);

            I have not tested this in a fast update scenario, but from the twitter video above, it looks like what he did.

            M 1 Reply Last reply Reply Quote 0
            • M
              m5dude @world101
              last edited by

              @world101

              I agree with you. the fast(er) update is done with

              M5.Lcd.setTextColor(TFT_BLACK,TFT_WHITE);

              world101W 1 Reply Last reply Reply Quote 0
              • world101W
                world101 @m5dude
                last edited by

                @m5dude

                Yep, or any combination of these defined colors

                TFT_BLACK
                TFT_NAVY
                TFT_DARKGREEN
                TFT_DARKCYAN
                TFT_MAROON
                TFT_PURPLE
                TFT_OLIVE
                TFT_LIGHTGREY
                TFT_DARKGREY
                TFT_BLUE
                TFT_GREEN
                TFT_CYAN
                TFT_RED
                TFT_MAGENTA
                TFT_YELLOW
                TFT_WHITE
                TFT_ORANGE
                TFT_GREENYELLOW
                TFT_PINK

                Or you can define your own color based on red, green, and blue values, like this:
                #define MY_CUSTOM_COLOR M5.Lcd.color565(83,54,120) /* uint16_t color565(uint8_t r, uint8_t g, uint8_t b), */

                M 1 Reply Last reply Reply Quote 1
                • M
                  m5dude @world101
                  last edited by

                  @world101

                  nice tip on the custom color didnt know that

                  JJJ 1 Reply Last reply Reply Quote 0
                  • JJJ
                    JJ @m5dude
                    last edited by JJ

                    @m5dude @joeybab3 @world101

                    0_1520926062432_d60dfa1c-0589-4e68-bc06-82e52d4e2106-image.png

                    --
                    The code for the counter pictured above has kindly been made available by the author at the following link:
                    https://gist.github.com/ksasao/c67d6fff5641e6fd40c7705352f6759e

                    A required file M5Stackupdater.h is available here: https://github.com/tobozo/M5Stack-SD-Updater/tree/master/src

                    --

                    There is also a timer app in the SAM menu program available here:
                    https://github.com/PartsandCircuits/M5Stack-SAM

                    --

                    And a list of programming functions here:
                    https://github.com/PartsandCircuits/M5CheatSheet

                    ** Should add that color command listed above.

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