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.arduino | |
| parent | 1368288178e48ba6164e8623ea85046e59041932 (diff) | |
draft Energia.mk and Makefiles
Diffstat (limited to 'csource/Blink/Blink.cpp.arduino')
| -rw-r--r-- | csource/Blink/Blink.cpp.arduino | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/csource/Blink/Blink.cpp.arduino b/csource/Blink/Blink.cpp.arduino new file mode 100644 index 0000000..1f97f77 --- /dev/null +++ b/csource/Blink/Blink.cpp.arduino @@ -0,0 +1,30 @@ +/* + Blink + Turns on an LED on for one second, then off for one second, repeatedly. + This example code is in the public domain. + */ + +#if defined(ARDUINO) && ARDUINO >= 100 +#include "Arduino.h" +#else +#include "WProgram.h" +#endif + +#ifndef BOARD_LED +#define BOARD_LED 13 +#endif + +void setup(); +void loop(); + +void setup() { + pinMode(BOARD_LED, OUTPUT); +} + +void loop() { + digitalWrite(BOARD_LED, HIGH); // set the LED on + delay(1000); // wait for a second + digitalWrite(BOARD_LED, LOW); // set the LED off + delay(500); // wait for a half a second +} + |
