aboutsummaryrefslogtreecommitdiff
path: root/assignments/blink-a-led
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2018-06-14 11:57:29 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2018-06-14 11:57:29 +0200
commit3c04ab07f66f279b0a346b91c6b4a131acb1d156 (patch)
treef197003e165e33354de106ab22f9df3050efe252 /assignments/blink-a-led
parent98bcc1683ca39b5456ded51dcfb8f53c57cbfc9a (diff)
downloadiot-workshop-ndc-2018-3c04ab07f66f279b0a346b91c6b4a131acb1d156.tar.gz
iot-workshop-ndc-2018-3c04ab07f66f279b0a346b91c6b4a131acb1d156.tar.bz2
iot-workshop-ndc-2018-3c04ab07f66f279b0a346b91c6b4a131acb1d156.tar.xz
iot-workshop-ndc-2018-3c04ab07f66f279b0a346b91c6b4a131acb1d156.zip
wip
Diffstat (limited to 'assignments/blink-a-led')
-rw-r--r--assignments/blink-a-led/blink-a-led.md26
-rw-r--r--assignments/blink-a-led/blink-a-led.pdfbin722602 -> 731445 bytes
2 files changed, 20 insertions, 6 deletions
diff --git a/assignments/blink-a-led/blink-a-led.md b/assignments/blink-a-led/blink-a-led.md
index a08bc4e..72bbb9c 100644
--- a/assignments/blink-a-led/blink-a-led.md
+++ b/assignments/blink-a-led/blink-a-led.md
@@ -6,10 +6,19 @@ Check that your local environment is working properly.
## Configure the Arduino IDE
-Under *Tools* -> *Board* make sure that "NodeMCU 1.0 (ESP-12E Module)"
-is available and selected.
+1. Make sure the "ESP8266" core is installed. If it is not installed
+ follow the installation instructions:
-Create a new sketch with *File* -> *New* and compile it with *ctrl-R*.
+ [https://github.com/esp8266/Arduino#installing-with-boards-manager](https://github.com/esp8266/Arduino#installing-with-boards-manager)
+
+1. Under *Tools* -> *Board* make sure that "NodeMCU 1.0 (ESP-12E
+ Module)" is available and selected.
+
+1. Select the correct serial port: *Tools -> Port*.
+
+1. Select the highest upload speed: *Tools -> Upload Speed*.
+
+1. Create a new sketch with *File* -> *New* and compile it with *ctrl-R*.
## Step 1
@@ -24,7 +33,7 @@ orientation is not important, but the LED's orientation is important.
## Step 2
-Implement `setup()` and `loop()`. In `setup()` configure the LED pin and blink the LED in `loop()`.
+Implement `setup()` and `loop()`: In `setup()` configure the LED pin and blink the LED in `loop()`.
Use these functions:
@@ -32,9 +41,14 @@ Use these functions:
Serial.begin(115200);
Serial.println(string);
+// Pin is D1/D2/D..
+// mode is INPUT or OUTPUT
pinMode(pin, mode);
-digitalWrite(pin, state); // HIGH or LOW
-delay();
+
+// HIGH or LOW
+digitalWrite(pin, state);
+
+delay(ms);
~~~
## Tips
diff --git a/assignments/blink-a-led/blink-a-led.pdf b/assignments/blink-a-led/blink-a-led.pdf
index da370c4..655f964 100644
--- a/assignments/blink-a-led/blink-a-led.pdf
+++ b/assignments/blink-a-led/blink-a-led.pdf
Binary files differ