I need your help. I stumbled across an issue which I'm not able to sort out. I'm trying to use the RTC module and therefore visited its documentation page. When I type the example code into the REPL console, everything works as expected:
Code: Select all
>>> rtc = pyb.RTC()
>>> rtc.datetime((2014, 5, 1, 4, 13, 0, 0, 0))
>>> print(rtc.datetime())
(2014, 5, 1, 4, 13, 0, 4, 26)
Code: Select all
import pyb
rtc = pyb.RTC
rtc.datetime((2014, 5, 1, 4, 13, 0, 0, 0))
print(rtc.datetime())
Code: Select all
PYB: sync filesystems
PYB: soft reboot
Traceback (most recent call last):
File "main.py", line 4, in <module>
TypeError: argument has wrong type
MicroPython v1.6-126-gf70873d on 2016-03-04; PYBv1.0 with STM32F405RG
Type "help()" for more information.
>>>
I first tried with MicroPython v1.5.2 and then upgraded to latest v1.6-126, but behaviour is the same.
Thanks for any help.
Thoralt