Created
February 27, 2015 16:55
-
-
Save krobro/774aaed8c02aa4fd8e43 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// | |
// LightItUp | |
// | |
// A simple LED example using the Multiplo LED sensor. | |
// Turns an LED on for one second, | |
// then off for one second, and so on forever ... or until you | |
// turn the Duinobot off. | |
// | |
// We are using port S0 on the Duinobot board | |
// | |
// NOTES: | |
// - Ports S0-S5 are analog input pins | |
// - S0 is identical to Arduino A0 and so on (S5=A5) | |
// - To use these ports as Digital pins add 14 | |
// | |
#define S0 0+14 | |
void setup() // run once, when the sketch starts | |
{ | |
pinMode(S0, OUTPUT); // sets the digital pin as output | |
} | |
void loop() // run over and over again | |
{ | |
digitalWrite(S0, HIGH); // sets the LED on | |
delay(1000); // waits for a second | |
digitalWrite(S0, LOW); // sets the LED off | |
delay(1000); // waits for a second | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment