Skip to content

Instantly share code, notes, and snippets.

@li2hub
Last active October 7, 2018 08:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save li2hub/bf0d1264855f4728e68270888b9505cd to your computer and use it in GitHub Desktop.
Save li2hub/bf0d1264855f4728e68270888b9505cd to your computer and use it in GitHub Desktop.
void setup(){
pinMode(D5,OUTPUT);
pinMode(D6,OUTPUT);
pinMode(D7,OUTPUT);
}
void loop(){
if(digitalRead(D1)==HIGH){
digitalWrite(D5,HIGH);
digitalWrite(D6,HIGH);
digitalWrite(D7,HIGH);
}
else{
digitalWrite(D5,LOW);
digitalWrite(D6,LOW);
digitalWrite(D7,LOW);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment