Core2 UiFlow



  • Hi,

    I defined with blockly a touch button. If the touch button ist pressed first the screen shall become red and then a filled circle shall be drawn on the background. In python the code looks like that:

    def touch_button0_pressed():
    global z_schwelle
    screen.set_screen_bg_color(0xff0000)
    wait_ms(1)
    lcd.circle(160, 120, 30, fillcolor=0xffffff)
    wait(2)
    pass
    touch_button0.pressed(touch_button0_pressed)

    Strangely, however, when the code is executed, the circle is drawn first and then the screnn is colored, with the circle disappearing. Why is the code executed in the wrong order? How can I prevent this? The wait commands I have inserted have not helped.

    Best regards,
    Torsten