Team,
Why Serial Monitor shows double "Getting your variable" which is triggering "Gatekeeper test if"?
Getting your variable:
Value: 1.00
Value: 1.00
void loop() {
float value = client.getValue(ID);
delay(100);
Serial.print("Value: "); //
Serial.println(value);
if (value == 1.00) { // Gotcha command from Google home
digitalWrite(garage,value); // Change pin value - Switch relay on and off
delay(700); // Press and hold garage button for X sec
digitalWrite(garage,0);
Serial.print("Value: ");
Serial.println(value);
delay(20000); // Wait until door closed 20 sec.
float value=0.00;
client.add(ID, 0.00); // Sending back to Ubidots value 0
client.sendAll(false);
delay(100);
// gatekeeper test
unsigned long currentMillis = millis();
if (currentMillis - previousMillis <= interval) {
previousMillis = currentMillis; // save the last time value=0.00;
Serial.print("Hacked!!!");
delay(1800000);
}