'RTC' object has no attribute 'alarm'
I'm pretty new to Python and the WiPy module. i received it last weekend and now I'm playin' arround.
I just want to set the WiPy periodically to sleep. But I get this confusing AttributeError. What's wrong?
Here's my code:
from machine import RTC
print("\nWiPy is up\n")
rtc = RTC()
rtc_irq = rtc.irq(trigger=RTC.ALARM0, handler=alarm_handler, wake=machine.SLEEP)
counter = counter + 1