Page 1 of 1

How is utime.sleep() realized?

Posted: Tue Aug 27, 2019 8:32 am
by Hasenradball
Hello Guys,

I would like to understand how is the sleep function (utime.sleep()) realized on hw.
Because if it is implemented as the same way like a delay() in Arduino style the controller stops all activity for the specific time.
Right?

Or is utime.sleep() realized in a other way?

Re: How is utime.sleep() realized?

Posted: Tue Aug 27, 2019 8:50 am
by jimmo
That's right - if you want to do something smarter I would recommend taking a look at asyncio

Peter has an excellent tutorial here https://github.com/peterhinch/micropyth ... UTORIAL.md