Pages: [1]   Go Down
Author Topic: help with TimeAlarm library  (Read 278 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Jr. Member
Karma: 0
Posts: 61
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


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

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,

Pages: [1]   Go Up
Jump to: