מיקרופייתון – TIME

מיקרופייתון – TIME

 

The equivalents to delay() and delayMicroseconds() when using ESP32 with MicroPython are sleep_ms() or sleep_us(). In addition, you can use sleep() which takes seconds as parameter.

millis() and micros() are called ticks_ms() and ticks_us() in MicroPython. With ticks_diff() you can determine time spans. Here is a small example:

 

 

כתיבת תגובה