machine.RTC documentation
Posted: Sun Apr 11, 2021 11:22 pm
Using the latest build on a PyBoard:
I'm having trouble with `machine.RTC`, the example given in the documentation doesn't work:
So far so good, but:
and:
also the available methods don't match the documentation by quite some margin:
`calibration`, `datetime`, `info`, and, `wakeup` aren't in the documentation and `init` doesn't appear to work (see above). Also the documentation mentions methods that aren't present, like `alarm`. There are no 'availability' notes in the documentation, implying that all methods in the documentation should exist.
Is there better documentation?
Thanks in advance,
Howard.
Code: Select all
MicroPython v1.14-68-gd4b45898f on 2021-02-18; PYBv1.1 with STM32F405RG
Code: Select all
>>> import machine
>>> rtc = machine.RTC()
Code: Select all
>>> rtc.init((2014, 5, 1, 4, 13, 0, 0, 0))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: function takes 1 positional arguments but 2 were given
Code: Select all
>>> print(rtc.now())
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'RTC' object has no attribute 'now'
Code: Select all
>>> dir(rtc)
['__class__', 'calibration', 'datetime', 'info', 'init', 'wakeup']
Is there better documentation?
Thanks in advance,
Howard.