Created
September 18, 2017 20:53
-
-
Save TRNT7/c25e01bb940820b2c30bda28ce3a5769 to your computer and use it in GitHub Desktop.
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
int pad0 = 2; | |
int pad1 = 3; | |
int pad2 = 4; | |
int pad3 = 5; | |
int pad4 = 6; | |
void setup() { | |
Serial.begin (9600); | |
pinMode(pad0, INPUT); | |
pinMode(pad1, INPUT); | |
pinMode(pad2, INPUT); | |
pinMode(pad3, INPUT); | |
pinMode(pad4, INPUT); | |
} | |
void loop() { | |
int padState0 = digitalRead(pad0); | |
int padState1 = digitalRead(pad1); | |
int padState2 = digitalRead(pad2); | |
int padState3 = digitalRead(pad3); | |
int padState4 = digitalRead(pad4); | |
if(padState0 == 0){ | |
Serial.println("DAMN"); | |
delay(1); | |
} | |
if(padState1 == 0){ | |
Serial.println("Hey"); | |
delay(1); | |
} | |
if(padState2 == 0){ | |
Serial.println("LOL"); | |
delay(1); | |
} | |
if(padState3 == 0){ | |
Serial.println("Sup"); | |
delay(1); | |
} | |
if(padState4 == 0){ | |
Serial.println("AYE"); | |
delay(1); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment