Skip to content

Instantly share code, notes, and snippets.

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 mark-wilson/3220401 to your computer and use it in GitHub Desktop.
Save mark-wilson/3220401 to your computer and use it in GitHub Desktop.
The file that is currently on an Arduino Uno with a serial number of 74132343530351609150
/*
USE_GITHUB_USERNAME=mark-wilson
*/
// Pins for coloured LEDs
int red = 12;
int green = 13;
void setup(){
// Set up pins as output devices
pinMode(red,OUTPUT);
pinMode(green,OUTPUT);
}
void loop(){
// Change the lights
// turnLightRed();
turnLightGreen();
}
void turnLightGreen(){
// Turn off the red and turn on the green
digitalWrite(red,LOW);
digitalWrite(green,HIGH);
}
void turnLightRed(){
// Turn off the green and turn on the red
digitalWrite(green,LOW);
digitalWrite(red,HIGH);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment