Core2Duo
Firmware : UiFlow 1.7.4.1-Core2
IDE : UiFlow 1.7.4
What I'm trying to do :
Display image 0 ( PNG , in Flash , 330 x 240 36.4 KB )
Wait for Button A to be pressed
Hide Image 0
Play WAV file ( SD card )
Show Label0
Wait 5
Show Image 0
What happens :
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.
Coded in Blockly,
0_1618199240915_Capture.JPG
Python :
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)
Yes, the duplicate remain if i save the file, refresh the webpage, or load the program again! But in the meantime I figured out the solution. Just right click to block and disable.
@hunterpark Yes. I am Facing same issue. each time we need to modify and run. after restarting UIflow again reset back default. I want to modify existing code to rectify as temporary solution. but it is bunch of JScript code and didn't understand how to proceed further.
I get a new API key on the M5Paper when I erase it (edit: using the erase button in the upper right of M5Burner) and then burn the firmware again. Would be easier to have a working button, though :)