Skip to content

Instantly share code, notes, and snippets.

@ArduinoDiscordBot
Created August 7, 2019 14:31
Show Gist options
  • Save ArduinoDiscordBot/6262cf9bd08059a6a9ea6a8ad1c70dbd to your computer and use it in GitHub Desktop.
Save ArduinoDiscordBot/6262cf9bd08059a6a9ea6a8ad1c70dbd to your computer and use it in GitHub Desktop.
Code by welp#1281 - Wed Aug 07 2019 14:31:52 GMT+0000 (Coordinated Universal Time)
void setup (){
pinMode(8, OUTPUT);
pinMode(2, INPUT);
}
void loop () {
if (digitalRead(2) == HIGH){
digitalWrite (8,HIGH);
}
else {
digitalWrite (8, LOW);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment