<?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[Possible Bug On Image Hide&#x2F;Show]]></title><description><![CDATA[<p dir="auto">Core2Duo<br />
Firmware : UiFlow 1.7.4.1-Core2<br />
IDE : UiFlow 1.7.4</p>
<p dir="auto">What I'm trying to do :</p>
<ul>
<li>Display image 0 ( PNG , in Flash , 330 x 240 36.4 KB )</li>
<li>Wait for Button A to be pressed</li>
<li>Hide Image 0</li>
<li>Play WAV file ( SD card )</li>
<li>Show Label0</li>
<li>Wait 5</li>
<li>Show Image 0</li>
</ul>
<p dir="auto">What happens :<br />
Everything works, with the exception of the image show/hide/show. It constantly shows after button A is pressed. Wave file pays, but no change to the image.</p>
<p dir="auto">Coded in Blockly,</p>
<p dir="auto"><img src="/assets/uploads/files/1618199248238-capture-resized.jpg" alt="0_1618199240915_Capture.JPG" class=" img-fluid img-markdown" /></p>
<p dir="auto">Python :</p>
<pre><code>from m5stack import *
from m5stack_ui import *
from uiflow import *
import time

screen = M5Screen()
screen.clean_screen()
screen.set_screen_bg_color(0xFFFFFF)

image0 = M5Img("res/Untitled-2.png", x=0, y=0, parent=None)

def buttonA_wasPressed():
  # global params
  image0.set_hidden(True)
  speaker.playWAV('/sd/accepted.wav', rate=44100, dataf=speaker.F16B)
  wait(5)
  image0.set_hidden(False)
  pass
btnA.wasPressed(buttonA_wasPressed)

image0.set_hidden(False)
</code></pre>
]]></description><link>https://community.m5stack.com/topic/3181/possible-bug-on-image-hide-show</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Apr 2026 06:42:21 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/3181.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 12 Apr 2021 03:49:14 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Possible Bug On Image Hide&#x2F;Show on Wed, 05 May 2021 22:36:27 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/delchi" aria-label="Profile: delchi">@<bdi>delchi</bdi></a> said in <a href="/post/13492">Possible Bug On Image Hide/Show</a>:</p>
<blockquote>
<p dir="auto">Core2Duo<br />
Firmware : UiFlow 1.7.4.1-Core2<br />
IDE : UiFlow 1.7.4</p>
<p dir="auto">What I'm trying to do :</p>
<ul>
<li>Display image 0 ( PNG , in Flash , 330 x 240 36.4 KB )</li>
<li>Wait for Button A to be pressed</li>
<li>Hide Image 0</li>
<li>Play WAV file ( SD card )</li>
<li>Show Label0</li>
<li>Wait 5</li>
<li>Show Image 0</li>
</ul>
<p dir="auto">What happens :<br />
Everything works, with the exception of the image show/hide/show. It constantly shows after button A is pressed. Wave file pays, but no change to the image.</p>
<p dir="auto">Coded in Blockly,</p>
<p dir="auto"><img src="/assets/uploads/files/1618199248238-capture-resized.jpg" alt="0_1618199240915_Capture.JPG" class=" img-fluid img-markdown" /></p>
<p dir="auto">Python :</p>
<pre><code>from m5stack import *
from m5stack_ui import *
from uiflow import *
import time

screen = M5Screen()
screen.clean_screen()
screen.set_screen_bg_color(0xFFFFFF)

image0 = M5Img("res/Untitled-2.png", x=0, y=0, parent=None)

def buttonA_wasPressed():
  # global params
  image0.set_hidden(True)
  speaker.playWAV('/sd/accepted.wav', rate=44100, dataf=speaker.F16B)
  wait(5)
  image0.set_hidden(False)
  pass
btnA.wasPressed(buttonA_wasPressed)

image0.set_hidden(False)
</code></pre>
</blockquote>
<p dir="auto">Bump ?</p>
]]></description><link>https://community.m5stack.com/post/13731</link><guid isPermaLink="true">https://community.m5stack.com/post/13731</guid><dc:creator><![CDATA[Delchi]]></dc:creator><pubDate>Wed, 05 May 2021 22:36:27 GMT</pubDate></item></channel></rss>