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

    Scrolling / m5.lcd.readRect()

    PROJECTS
    2
    2
    8.6k
    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.
    • RopR
      Rop
      last edited by

      Dear M5 engineers and others,

      I would like to implement screen scrolling. For that I need the m5.lcd.readRect() function of the display code to work. It doesn't seem to work right now: it seems to return white pixels, no matter what's on the screen. I am trying:

      void scroll(uint8_t pixels) {
      	uint16_t buffer[TFT_W];
      	for (uint8_t n = 0; n < TFT_H - pixels; n++) {
      		m5.lcd.readRect(0, n + pixels, TFT_W, 1, buffer);
      		m5.lcd.pushRect(0, n, TFT_W, 1, buffer);
      	}
      }
      

      Am I doing something wrong? Is there any reason with the way the display is hooked up why reading wouldn't work, or anything one can do to make it work...? (I know I can speed up the scroll by moving more than 1 line at a time, I'll get to that when it works...)

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

        Hi
        I'm having the same problem with the M5Stack/Advanced/Display/TFT_Screen_Capture example just get white screen captures (0xFFFF for any pixel )
        Keith

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