48 pinMode(fID, INPUT_PULLUP);
49 pinMode(fRelayPin, OUTPUT);
55 return !digitalRead(fID);
80 if (fArmed && fCount == 0)
82 fCount = random(10, 20);
83 fCount += !(fCount&1);
95 digitalWrite(fRelayPin, LOW);
103 if (*cmd++ ==
'B' && *cmd++ ==
'Z')
108 if (cmd[0] ==
'O' && cmd[1] ==
'N' && cmd[2] ==
'\0')
112 else if (cmd[0] ==
'O' && cmd[1] ==
'F' && cmd[2] ==
'F' && cmd[3] ==
'\0')
124 if (!fArmed || fCount == 0)
126 uint32_t currentTime = millis();
127 if (fNextTime < currentTime)
129 bool relayOn = (fCount-- & 1);
132 digitalWrite(fRelayPin, LOW);
133 fNextTime = currentTime + random(100,200);
137 digitalWrite(fRelayPin, HIGH);
138 fNextTime = currentTime + random(200, 800);