Created
March 29, 2014 10:12
-
-
Save volca/9851854 to your computer and use it in GitHub Desktop.
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
int RXLED = 17; // The RX LED has a defined Arduino pin | |
// The TX LED was not so lucky, we'll need to use pre-defined | |
// macros (TXLED1, TXLED0) to control that. | |
// (We could use the same macros for the RX LED too -- RXLED1, | |
// and RXLED0.) | |
void setup() | |
{ | |
pinMode(RXLED, OUTPUT); // Set RX LED as an output | |
// TX LED is set as an output behind the scenes | |
} | |
void loop() | |
{ | |
digitalWrite(RXLED, LOW); // set the LED on | |
TXLED0; //TX LED is not tied to a normally controlled pin | |
delay(1000); // wait for a second | |
digitalWrite(RXLED, HIGH); // set the LED off | |
TXLED1; | |
delay(1000); // wait for a second | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment