help with TimeAlarm library

Hello,

I would like to set an output high and then, after 30 min set it low.

Therefore, I can simply use a timer (<TimeAlarms.h> lib):

set pix x high for sensor Y
AlarmOnce(900,timerswitch)

Now, when the function timerswitch is executed, I need the sensorname (via an array I get the pin) which must be set LOW

SO :

  • it is not possible to give a parameter through a function in an alarm mode (fe AlarmOnce(900,timerswitch(sensorY))

The other option is to save the alarmID and sensorname in an array
This way I always now which alarm is active for which sensor.

But when the function timerswitch() is executed after 30 minutes by the alarm, I need to know the alarmID to know the sensorname to put this pin LOW.

Any idea how to get the alarmID in the function executed by the alarm (and yes, I will have many alarms and sensors)

Thanks in advance,
Jeroen