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

pull/1/head
Mike Causer 2017-10-06 01:48:43 +11:00 committed by Damien George
parent dc92f1c4ee
commit f599a38059
1 changed files with 11 additions and 0 deletions

View File

@ -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
---------------