Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.