<?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[M5Flow Blockly Screen rotate issue]]></title><description><![CDATA[<p dir="auto">If I develop a simple Blockly (M5Flow) layout for rotating the screen, this does not work. When I look at the underlying Python code I noticed the "lcd.setRotation()" code ends up at the start of the code, and not at the spots where I would expect it (for this example in the button code blocks)</p>
<p dir="auto"><strong>Blockly Code:</strong><br />
<img src="/assets/uploads/files/1590177150132-944a0098-9359-4515-9362-d286beb9aaf9-image.png" alt="0_1590177150236_944a0098-9359-4515-9362-d286beb9aaf9-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto"><strong>Python Code:</strong></p>
<pre><code>from m5stack import *
from m5ui import *
from uiflow import *
lcd.setRotation(1)
lcd.setRotation(3)

setScreenColor(0x222222)

label0 = M5TextBox(123, 111, "Text", lcd.FONT_Default,0xFFFFFF, rotate=0)

def buttonA_wasPressed():
  # global params
  pass
btnA.wasPressed(buttonA_wasPressed)

def buttonB_wasPressed():
  # global params
  pass
btnB.wasPressed(buttonB_wasPressed)
</code></pre>
<p dir="auto">If I copy/paste the "lcd.setRotation()" code blocks into the button blocks, the code works properly on the device. But when I switch back to Blockly, this solution is reverted. I'm having this issue with firmwares 1.4.5.1 and 1.5.2</p>
]]></description><link>https://community.m5stack.com/topic/1979/m5flow-blockly-screen-rotate-issue</link><generator>RSS for Node</generator><lastBuildDate>Sun, 08 Mar 2026 14:11:54 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/1979.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 22 May 2020 20:02:03 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to M5Flow Blockly Screen rotate issue on Sun, 30 Aug 2020 06:49:38 GMT]]></title><description><![CDATA[<p dir="auto">Just calling the screenrotate function will not rotate the already drawn screen contents.  Just after using this function, the rest of the graphic functions will draw on the screen in a different orientation.  So it seems to me that where this instruction does not need to be right at the beginning of the program.</p>
]]></description><link>https://community.m5stack.com/post/9884</link><guid isPermaLink="true">https://community.m5stack.com/post/9884</guid><dc:creator><![CDATA[robalstona]]></dc:creator><pubDate>Sun, 30 Aug 2020 06:49:38 GMT</pubDate></item><item><title><![CDATA[Reply to M5Flow Blockly Screen rotate issue on Sun, 30 Aug 2020 06:33:25 GMT]]></title><description><![CDATA[<p dir="auto">There should be an initial Set Rotation should always be at the start in the setup phase before the main loop.</p>
]]></description><link>https://community.m5stack.com/post/9883</link><guid isPermaLink="true">https://community.m5stack.com/post/9883</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Sun, 30 Aug 2020 06:33:25 GMT</pubDate></item><item><title><![CDATA[Reply to M5Flow Blockly Screen rotate issue on Sun, 30 Aug 2020 02:39:17 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/1">@m5stack</a></p>
<p dir="auto">Sorry for revive old post.</p>
<p dir="auto">Any news about this?</p>
]]></description><link>https://community.m5stack.com/post/9879</link><guid isPermaLink="true">https://community.m5stack.com/post/9879</guid><dc:creator><![CDATA[edenfy]]></dc:creator><pubDate>Sun, 30 Aug 2020 02:39:17 GMT</pubDate></item><item><title><![CDATA[Reply to M5Flow Blockly Screen rotate issue on Tue, 30 Jun 2020 20:14:06 GMT]]></title><description><![CDATA[<p dir="auto">Thanks, much appreciated!</p>
]]></description><link>https://community.m5stack.com/post/9205</link><guid isPermaLink="true">https://community.m5stack.com/post/9205</guid><dc:creator><![CDATA[sjako]]></dc:creator><pubDate>Tue, 30 Jun 2020 20:14:06 GMT</pubDate></item><item><title><![CDATA[Reply to M5Flow Blockly Screen rotate issue on Wed, 24 Jun 2020 02:09:05 GMT]]></title><description><![CDATA[<p dir="auto">thank you feedback.  this bug we will fix as soon as possible</p>
]]></description><link>https://community.m5stack.com/post/9116</link><guid isPermaLink="true">https://community.m5stack.com/post/9116</guid><dc:creator><![CDATA[m5stack]]></dc:creator><pubDate>Wed, 24 Jun 2020 02:09:05 GMT</pubDate></item><item><title><![CDATA[Reply to M5Flow Blockly Screen rotate issue on Tue, 23 Jun 2020 22:06:14 GMT]]></title><description><![CDATA[<p dir="auto">Does anybody have any clue why this happens? Should the screen only be rotated once?</p>
]]></description><link>https://community.m5stack.com/post/9113</link><guid isPermaLink="true">https://community.m5stack.com/post/9113</guid><dc:creator><![CDATA[sjako]]></dc:creator><pubDate>Tue, 23 Jun 2020 22:06:14 GMT</pubDate></item></channel></rss>