Skip to content

Commit f599a38

Browse files
mcauserdpgeorge
authored andcommitted
docs/esp8266/quickref: Add quickref info for RTC class.
1 parent dc92f1c commit f599a38

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

docs/esp8266/quickref.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,17 @@ and is accessed via the :ref:`machine.I2C <machine.I2C>` class::
223223
buf = bytearray(10) # create a buffer with 10 bytes
224224
i2c.writeto(0x3a, buf) # write the given buffer to the slave
225225

226+
Real time clock (RTC)
227+
---------------------
228+
229+
See :ref:`machine.RTC <machine.RTC>` ::
230+
231+
from machine import RTC
232+
233+
rtc = RTC()
234+
rtc.datetime((2017, 8, 23, 1, 12, 48, 0, 0)) # set a specific date and time
235+
rtc.datetime() # get date and time
236+
226237
Deep-sleep mode
227238
---------------
228239

0 commit comments

Comments
 (0)