Alarms are created and accessed using the special Alarms
object. Several alarms are used by the core software itself, but there's room for you to create at least a few dozen alarms as well, if you need that many!
This sketch shows the three basic steps to using an alarm:
// Alarm sketch 1: Print a message 30 seconds after power up // Here's my alarm handler. This kind of alarm handler (the simpler // kind) must always be declared to take a one u32 argument, and to // return void. void myAlarmHandler(u32 when) { println("I'm awake already"); } void setup() { int num; num = Alarms.create(myAlarmHandler); // Create an alarm, get its number Alarms.set(num,30*1000); // Set it for 30 seconds of uptime } void loop() { /* Nothing to do */ }