For differences between NodeMCU v0.9 vs v1.0 vs v2.0, refer to the info. at the link below.
https://frightanic.com/iot/comparison-of-esp8266-nodemcu-development-boards/#v1
NodeMCU v1.0
This is the version that I use for this post.
Prepare the development environment
1. Download the driver for "CP210x USB to UART Bridge VCP Drivers" from the site below
https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers
2. With NodeMCU not connected to your computer, install the downloaded driver to your computer.
3. Connect NodeMCU to your computer. Your computer should detect the presence of the USB to UART chip and you should be able to see it in your Device Manager.
Note, If your system cannot detect NodeMCU board after the driver is successfully installed, try using a different USB cable to connect your computer to the NodeMCU board (this solved my problem).
Testing with a sample Arduino Sketch
1. Launch Arduino IDE. Set the board related info. according to those in the red square shown below.
2. Upload a simple sketch such as the one shown below to NodeMCU.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | /* ESP8266 Blink by Simon Peter Blink the blue LED on the ESP-01 module This example code is in the public domain The blue LED on the ESP-01 module is connected to GPIO1 (which is also the TXD pin; so we cannot use Serial.print() at the same time) Note that this sketch uses LED_BUILTIN to find the pin with the internal LED */ void setup() { pinMode(LED_BUILTIN, OUTPUT); // Initialize the LED_BUILTIN pin as an output } // the loop function runs over and over again forever void loop() { digitalWrite(LED_BUILTIN, LOW); // Turn the LED on (Note that LOW is the voltage level // but actually the LED is on; this is because // it is acive low on the ESP-01) delay(1000); // Wait for a second digitalWrite(LED_BUILTIN, HIGH); // Turn the LED off by making the voltage HIGH delay(2000); // Wait for two seconds (to demonstrate the active low LED) } |
3. Observe the result in the output message window in the Arduino IDE and the LED on NodeMCU board.
References:
Powering the ESP-12E NodeMCU Development Board
http://henrysbench.capnfatz.com/henrys-bench/arduino-projects-tips-and-more/powering-the-esp-12e-nodemcu-development-board/
No comments:
Post a Comment