diff options
| author | Donald Delmar Davis <don@suspectdevices.com> | 2012-10-07 20:20:55 -0700 |
|---|---|---|
| committer | Donald Delmar Davis <don@suspectdevices.com> | 2012-10-07 20:20:55 -0700 |
| commit | a5094138af9cd518a4e8eca33bb32a6701617fbc (patch) | |
| tree | 7da712019e5316bc18359765f98f0c4cc191152d /csource/Blink/Blink.cpp | |
| parent | 1368288178e48ba6164e8623ea85046e59041932 (diff) | |
draft Energia.mk and Makefiles
Diffstat (limited to 'csource/Blink/Blink.cpp')
| -rw-r--r-- | csource/Blink/Blink.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/csource/Blink/Blink.cpp b/csource/Blink/Blink.cpp new file mode 100644 index 0000000..a8c64ba --- /dev/null +++ b/csource/Blink/Blink.cpp @@ -0,0 +1,24 @@ +#include "Energia.h" +void setup(); +void loop(); +#line 1 +/* + Blink + Turns on an LED on for one second, then off for one second, repeatedly. + + This example code is in the public domain. + */ + +void setup() { + // initialize the digital pin as an output. + // Pin 14 has an LED connected on most Arduino boards: + pinMode(14, OUTPUT); +} + +void loop() { + digitalWrite(14, HIGH); // set the LED on + delay(1000); // wait for a second + digitalWrite(14, LOW); // set the LED off + delay(1000); // wait for a second +} + |
