aboutsummaryrefslogtreecommitdiff
path: root/assignments/blink-a-led/blink-a-led.md
diff options
context:
space:
mode:
Diffstat (limited to 'assignments/blink-a-led/blink-a-led.md')
-rw-r--r--assignments/blink-a-led/blink-a-led.md26
1 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