Pico RTC Alarm?
#9594
Replies: 2 comments 3 replies
-
While the RP2040's RTC does have an an alarm function (see RP2040 datasheet "4.8.5.4. Configuring an Alarm", p.553), it's not implemented in MicroPython for the RP2. The generic documentation for machine.RTC() is a superset of what each port provides |
Beta Was this translation helpful? Give feedback.
1 reply
-
Hello, as the RTC Alarm is not available for Pico and current API is not optimal, I've written a simple wrapper around the RP Pico SDK functions for the RTC Alarm. You may check it at https://github.com/jahr/rp2-rtc-alarm.git |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Documentation here https://docs.micropython.org/en/latest/rp2/quickref.html#real-time-clock-rtc suggests that the RP2 has a RTC and refers to machine.RTC documentation. I see that RTC works in terms of setting/getting date time.
However allegedly it includes an "alarm" function. Except on the Pico when you try and use it it says "AttributeError: 'RTC' object has no attribute 'alarm'"
So if it hasn't got an alarm what's the process for performing long running tasks on a schedule? When I say long running I still mean subsecond. But too long to use a timer (especially when I have a 20mS timer going off - a long running process on a second timer stops that happening).
rp2-pico-w-20221011-unstable-v1.19.1-532-g8e912a501
Beta Was this translation helpful? Give feedback.
All reactions