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

    Core2 UiFlow

    Scheduled Pinned Locked Moved UIFlow
    1 Posts 1 Posters 1.7k Views
    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 Offline
      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

      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

      With your input, this post could be even better 💗

      Register Login
      • First post
        Last post