What is the best way to create a date range with Yun?
What I want to do is look for action to happen, log the time, and if the time logged is within a set range trigger and alarm.
The below code is the gist of what I want to accomplish but obviously isn't correct:
int zone1Start = 1300; //User set time for sensor tigger (example 13:00). Doesn't matter the format as long as I can add or subtract minutes/seconds
int startDev = 2; //if actual start time of sensor is = to zone1Start plus or minus 2 minutes trigger alarm
int flowStart;
void setup() {
}
void loop() {
if(flowStart> (zone1Start - startDev) && flowStart<(zone1Start + startDev)){
//trigger alarm
}else{
//do nothing
}
}