Trying to work out what the callback signature for the RTC is.
The documentation says:
However:If ``callback`` is given then it is executed at every trigger of the wakeup timer. ``callback`` must take exactly one argument.
Code: Select all
>>> def callback(line):
... print('Callback')
... print('line = ', line, ' type = ', type(line))
...
>>> rtc.wakeup(2000, callback)
Code: Select all
>>> Callback
Traceback (most recent call last):
File "<stdin>", line 3, in callback
NameError: local variable referenced before assignment
Callback
Traceback (most recent call last):
File "<stdin>", line 3, in callback
NameError: local variable referenced before assignment
...