Created
July 31, 2012 20:50
-
-
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
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
/* | |
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