🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Core2 UiFlow

    UIFlow
    1
    1
    1.2k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • N
      Nestor89
      last edited by

      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

      1 Reply Last reply Reply Quote 0
      • First post
        Last post