docs/esp8266/quickref: Add quickref info for RTC class.

pull/3331/merge
Mike Causer 2017-10-06 01:48:43 +11:00 zatwierdzone przez Damien George
rodzic dc92f1c4ee
commit f599a38059
1 zmienionych plików z 11 dodań i 0 usunięć

Wyświetl plik

@ -223,6 +223,17 @@ and is accessed via the :ref:`machine.I2C <machine.I2C>` class::
buf = bytearray(10) # create a buffer with 10 bytes
i2c.writeto(0x3a, buf) # write the given buffer to the slave
Real time clock (RTC)
---------------------
See :ref:`machine.RTC <machine.RTC>` ::
from machine import RTC
rtc = RTC()
rtc.datetime((2017, 8, 23, 1, 12, 48, 0, 0)) # set a specific date and time
rtc.datetime() # get date and time
Deep-sleep mode
---------------