aboutsummaryrefslogtreecommitdiff
path: root/csource/Blink/Blink.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'csource/Blink/Blink.cpp')
-rw-r--r--csource/Blink/Blink.cpp24
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
+}
+