![]() ![]() May take longer than that if other processing must take place, for example This function will delay for at least the given number of milliseconds, but sleep_ms ( ms ) ¶ĭelay for given number of milliseconds, should be positive or 0. Them use sleep_ms() and sleep_us() functions. Other boards may not accept a floating-point argument, for compatibility with Some boards may accept seconds as aįloating-point number to sleep for a fractional number of seconds. Year includes the century (for example 2014). The format of the entries in the 8-tuple are: The gmtime() function returns a date-time tuple in UTC, and localtime() returns a If secs is not provided or None, then the current time from the RTC is used. localtime ( ) ¶Ĭonvert the time secs expressed in seconds since the Epoch (see above) into anĨ-tuple which contains: (year, month, mday, hour, minute, second, weekday, yearday) If actual calendar time is not maintained with a system/MicroPython RTC,įunctions below which require reference to current absolute time mayīehave not as expected. RTC time across hard resets, though some may require setting it again Set manually by a user on each power-up (many boards then maintain Using networked time protocol (requires setup by a port/user). May be set using machine.RTC().datetime(tuple) function, and maintainedīy a backup battery (which may be an additional, optional component for System time depends on machine.RTC() object. Time is responsibility of OS/RTOS and is done outside of MicroPython, On systems with underlying OS (including some Maintaining actual calendar date/time: This requires a Epoch year may be determined with gmtime(0). However, some embedded ports use epoch of Time Epoch: Unix port uses standard for POSIX systems epoch of Measuring time intervals, and for delays. The time module provides functions for getting the current time and date, For more information, refer to the original This module implements a subset of the corresponding CPython module,Īs described below. Quick reference for the SAMD21/SAMD51 family.Quick reference for the UNIX and Windows ports.MicroPython language and implementation.Extending built-in libraries from Python. ![]() zlib – zlib compression & decompression.struct – pack and unpack primitive data types.select – wait for events on a set of streams.platform – access to underlying platform’s identifying data.gzip – gzip compression & decompression.collections – collection and container types.cmath – mathematical functions for complex numbers.builtins – builtin functions and exceptions.Python standard libraries and micro-libraries. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |