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

    Delay

    M5 Stick/StickC
    4
    6
    8.5k
    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
      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
        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
          morrischen
          last edited by morrischen

          @AgreeDK will this method work in python?

          world101W A 2 Replies Last reply Reply Quote 0
          • world101W
            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
              AgreeDK @morrischen
              last edited by

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

              1 Reply Last reply Reply Quote 0
              • R
                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
                • First post
                  Last post