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

    Delay

    Scheduled Pinned Locked Moved M5 Stick/StickC
    6 Posts 4 Posters 10.9k Views 3 Watching
    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.
    • M Offline
      morrischen
      last edited by

      Hello! I am wondering how to replace delay with millis, the delay pauses the module which I do not want, I'd like to do other stuff while something is counting for example.

      A 1 Reply Last reply Reply Quote 0
      • A Offline
        AgreeDK @morrischen
        last edited by

        @morrischen Look here : https://randomnerdtutorials.com/why-you-shouldnt-always-use-the-arduino-delay-function/

        1 Reply Last reply Reply Quote 1
        • M Offline
          morrischen
          last edited by morrischen

          @AgreeDK will this method work in python?

          world101W A 2 Replies Last reply Reply Quote 0
          • world101W Offline
            world101 @morrischen
            last edited by

            @morrischen

            Use timers to implement non-blocking code. Supported in Python and uiFlow.

            1 Reply Last reply Reply Quote 1
            • A Offline
              AgreeDK @morrischen
              last edited by

              @morrischen no, did not see you ask for Python solution ;-)

              1 Reply Last reply Reply Quote 0
              • R Offline
                robalstona
                last edited by

                You can try this:

                https://www.google.com/amp/s/techtutorialsx.com/2017/10/02/esp32-micropython-creating-a-thread/amp/

                But this may not work properly with all modules included in micropython firmware. You need also micropython version 1.14.

                1 Reply Last reply Reply Quote 1

                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