Untitled
unknown
plain_text
2 years ago
532 B
13
Indexable
void setup_Door(void *pvParameter)
{
while(1){
Firebase.RTDB.getString(&fbdo, "common/DoorStatus");
DoorStatus = fbdo.stringData();
if (DoorStatus == "Open" && t == 1)
{
digitalWrite(BUZZER_PIN, HIGH);
delay(100);
digitalWrite(BUZZER_PIN, LOW);
actMoCua();
t = 2;
}
else if (DoorStatus == "Close" && t == 2)
{
digitalWrite(BUZZER_PIN, HIGH);
delay(100);
digitalWrite(BUZZER_PIN, LOW);
actDongCua();
t = 1;
}
vTaskDelay(pdMS_TO_TICKS(1000));
}
}Editor is loading...