Recent Posts

#9 NodeMCU: Connect to Arduino IDE and Upload LED Blinking program


IoT Tutorial #9 [ NodeMCU Tutorials #1 ]
Here I will demonstrate, How to configure Arduino IDE to work with NodeMCU 1.0 ESP8266 (ESP-12E Module).

Problem Statement:
1. To Configure Arduino IDE and install required drivers and libraries to connect NodeMCU to it.
2. Burn First simple program to Blink built-in LED of the NodeMCU board.






Requirements:
- NodeMCU board - 1.0 ESP8266 (ESP-12E Module)
- Micro USB Cable
- Arduino IDE installed on your PC.
- Active Internet Connection


Program Outcome:
Built-In LED (Blue in my case) will blink with specific time interval.
Physical Connection:
Just Connect NodeMCU Board to PC using USB to Micro-USB cable
Steps:
Configure Arduino IDE to connect with NodeMCU 1.0 ESP8266 (ESP-12E Module).

1. Open Arduino IDE
   Go To File > Preferances > Put following URL to "Additional Board Manager URL's"
   http://arduino.esp8266.com/stable/package_esp8266com_index.json
   Click OK.

2. Go To Tools > Board > Boards Manager > Search: Node
   Click on "esp8266"
   select version 2.3.0 > Click on Install

3. Go to Following Link and Install respective Drivers
   https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers
4. Go to System Preferences > Security & Privacy > General > Allow
5. Restart Computer
6. Disconnect all connected Arduino Boards
7. Connect NodeMCU to Laptop through MicroUSB cable
8. Open Arduino IDE, 
   Go To Tools > select Board: "NodeMCU 1.0 (ESP-12E Module)" 
9. Go To File > Examples > ESP8266 > Blink 
10. Upload the Code
11. Done. Blue LED should Blink on ModeMCU Board With delay of 1 Sec.
12. Now NodeMCU is configured with your Arduino IDE.
Downloads:
Download link is given in the Description of the YouTube video shown below.

Demonstration:



Program:
In case you couldn't find the code in File > Examples, Copy below code: 
/*****************************************************************************
 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)
}

Click here to see more codes for NodeMCU ESP8266 and similar Family.
&
Click here to see more codes for Arduino Mega (ATMega 2560) and similar Family.

Feel free to ask doubts in the comment section. I will try my best to solve it.
If you find this helpful by any mean like, comment and share the post.
This is the simplest way to encourage me to keep doing such work.

Thanks and Regards,
-Akshay P. Daga

No comments