aboutsummaryrefslogtreecommitdiff
path: root/assignments/blink-a-led/solution
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2018-04-25 09:21:13 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2018-04-25 09:21:13 +0200
commit4bae244f426a39951f404af8f752f715a151f20e (patch)
tree792b45c2f035a5ae8c974025d9510b730aebe644 /assignments/blink-a-led/solution
parent42ec7df723ece5c2c4400d8db24e3a2ac6b826d0 (diff)
downloadiot-workshop-4bae244f426a39951f404af8f752f715a151f20e.tar.gz
iot-workshop-4bae244f426a39951f404af8f752f715a151f20e.tar.bz2
iot-workshop-4bae244f426a39951f404af8f752f715a151f20e.tar.xz
iot-workshop-4bae244f426a39951f404af8f752f715a151f20e.zip
o Renaming arduino to assignments.
Diffstat (limited to 'assignments/blink-a-led/solution')
-rw-r--r--assignments/blink-a-led/solution/assignment-1/assignment-1.ino20
1 files changed, 20 insertions, 0 deletions
diff --git a/assignments/blink-a-led/solution/assignment-1/assignment-1.ino b/assignments/blink-a-led/solution/assignment-1/assignment-1.ino
new file mode 100644
index 0000000..5b72892
--- /dev/null
+++ b/assignments/blink-a-led/solution/assignment-1/assignment-1.ino
@@ -0,0 +1,20 @@
+const int LED_PIN = D0;
+
+void setup() {
+ Serial.begin(115200);
+ Serial.println();
+ Serial.println();
+ Serial.println("Hello world!");
+ pinMode(LED_PIN, OUTPUT);
+}
+
+void loop() {
+ digitalWrite(LED_PIN, HIGH);
+ Serial.println("HIGH");
+ delay(1000);
+
+ digitalWrite(LED_PIN, LOW);
+ Serial.println("LOW");
+ delay(1000);
+}
+