Created
August 28, 2017 16:40
-
-
Save GuitouFlc/f4c560a4fb077dfb01f7f52b68a0bedb to your computer and use it in GitHub Desktop.
test cligno francois
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const int CG = 10 | |
const int CD = 11 | |
const int BG = 12 | |
const int BD = 13 | |
int BDState = 0 | |
int BGState = 0 | |
void setup() { | |
//CG=cligno gauche CD=... | |
pinMode(CG, OUTPUT); | |
pinMode(CD, OUTPUT); | |
pinMode(BG, inPUT); | |
pinMode(BD, inPUT); | |
} | |
void loop() { | |
BGState = digitalRead(BG); | |
BDState = digitalRead(BD); | |
if (BGState == HIGH) { | |
digitalWrite(CG, HIGH); | |
delay(500); | |
digitalWrite(CG, LOW); | |
delay(500) | |
} else { | |
digitalWrite(CG, LOW); | |
} | |
if (BDState == HIGH) { | |
digitalWrite(CD, HIGH); | |
delay(500) | |
digitalWrite(CD, LOW); | |
delay(500) | |
} else { | |
digitalWrite(CD, LOW); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment