<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Scrolling &#x2F; m5.lcd.readRect()]]></title><description><![CDATA[<p dir="auto">Dear M5 engineers and others,</p>
<p dir="auto">I would like to implement screen scrolling. For that I need the <code>m5.lcd.readRect()</code> 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:</p>
<pre><code>void scroll(uint8_t pixels) {
	uint16_t buffer[TFT_W];
	for (uint8_t n = 0; n &lt; TFT_H - pixels; n++) {
		m5.lcd.readRect(0, n + pixels, TFT_W, 1, buffer);
		m5.lcd.pushRect(0, n, TFT_W, 1, buffer);
	}
}
</code></pre>
<p dir="auto">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...)</p>
]]></description><link>https://community.m5stack.com/topic/277/scrolling-m5-lcd-readrect</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Apr 2026 22:35:46 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/277.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 02 Aug 2018 13:52:46 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Scrolling &#x2F; m5.lcd.readRect() on Sun, 09 Sep 2018 08:12:54 GMT]]></title><description><![CDATA[<p dir="auto">Hi<br />
I'm having the same problem with the M5Stack/Advanced/Display/TFT_Screen_Capture example just get white screen captures (0xFFFF for any pixel )<br />
Keith</p>
]]></description><link>https://community.m5stack.com/post/1499</link><guid isPermaLink="true">https://community.m5stack.com/post/1499</guid><dc:creator><![CDATA[KeithW]]></dc:creator><pubDate>Sun, 09 Sep 2018 08:12:54 GMT</pubDate></item></channel></rss>