Skip to content

Instantly share code, notes, and snippets.

@ThaiEasyElec
Created July 23, 2019 10:31
Show Gist options
  • Save ThaiEasyElec/48b0fc02aafe69f17458f1bdd404aeb0 to your computer and use it in GitHub Desktop.
Save ThaiEasyElec/48b0fc02aafe69f17458f1bdd404aeb0 to your computer and use it in GitHub Desktop.
Home Alarm System
void close_all_power(){ // Function close the light all.
digitalWrite(status_lock, HIGH);
digitalWrite(status_unlock, LOW);
digitalWrite(led_bed, LOW);
digitalWrite(led_bath, LOW);
}
void Alarm(){ // Function Alarm.
digitalWrite(Buzzer, HIGH); // Turn on Buzzer
delay(100); // delay 100 milliseconds
digitalWrite(Buzzer, LOW); // Turn off Buzzer
delay(100); // delay 100 milliseconds
}
void Alarm_off(){ // Function Alarm off.
digitalWrite(Buzzer,HIGH); //Set buzzer pin is HIGH for stop alarm
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment