How to Program NodeMCU on Arduino IDE
by osoyooproduct in Circuits > Remote Control
179395 Views, 28 Favorites, 0 Comments
How to Program NodeMCU on Arduino IDE
![NodeMCU IOT Kit Lesson 1: Install the ESP8266 Board Package and the Serial Port Driver](/proxy/?url=https://content.instructables.com/FFO/4HLD/J7QGGU2O/FFO4HLDJ7QGGU2O.jpg&filename=NodeMCU IOT Kit Lesson 1: Install the ESP8266 Board Package and the Serial Port Driver)
The Osoyoo NodeMCU comes pre-programmed with Lua interpretter, but you don’t have to use it! Instead, you can use the Arduino IDE which may be a great starting point for Arduino lovers to familiarize themselves with the technologies surrounding the IoT.Note that when you use the NodeMCU board with the Arduino IDE ,it will write directly to the firmware, erasing the NodeMCU firmware.So if you want to back to Lua SDK,use the “flasher” to re-install the firmware.
The NodeMCU programming can be as easy as in Arduino,the main difference is the distribution of pins in the nodemcu board.Following below operations and enjoy your first NodeMCU & Arduino IDE travel!
Connect Your NodeMCU to the Computer
Use the USB cable to connect your NodeMCU to the computer,you will see the blue onboard LED flicker when powered up, but they will not stay lit.
Install the COM/Serial Port Driver
In order to upload code to the ESP8266 and use the serial console, connect any data-capable micro USB cable to ESP8266 IOT Board and the other side to your computer’s USB port.
The new version NodeMCUv1.0 comes with the CP2102 serial chip,you can download and install the driver from:https://www.silabs.com/products/development-tools/.... The NodeMCUv0.9 comes with the CH340 serial chip,you can download and install the driver from:https://github.com/nodemcu/nodemcu-devkit/tree/mas...
Install the Arduino IDE 1.6.4 or Greater
Download Arduino IDE from Arduino.cc (1.6.4 or greater) – don’t use 1.6.2! You can use your existing IDE if you have already installed it. You can also try downloading the ready-to-go package from the ESP8266-Arduino project, if the proxy is giving you problems
Install the ESP8266 Board Package
![1.jpg](/proxy/?url=https://content.instructables.com/F75/FYRT/J7QGGU8U/F75FYRTJ7QGGU8U.jpg&filename=1.jpg)
![2.jpg](/proxy/?url=https://content.instructables.com/F4L/BKVJ/J7QGGU8X/F4LBKVJJ7QGGU8X.jpg&filename=2.jpg)
![3.jpg](/proxy/?url=https://content.instructables.com/FKY/D5SW/J7QGGU8Y/FKYD5SWJ7QGGU8Y.jpg&filename=3.jpg)
![4.jpg](/proxy/?url=https://content.instructables.com/FO7/1VAY/J7QGGU8Z/FO71VAYJ7QGGU8Z.jpg&filename=4.jpg)
![5.jpg](/proxy/?url=https://content.instructables.com/FJV/U4SE/J7QGGU98/FJVU4SEJ7QGGU98.jpg&filename=5.jpg)
Enter http://arduino.esp8266.com/stable/package_esp8266... into Additional Board Manager URLs field in the Arduino v1.6.4+ preferences (Open Arduino IDE–>File–>Perferences–>Settings). Enter the link and click “OK” to save your changes. Next, use the Board Manager to install the ESP8266 package Enter the Boards Manager and find the board type as below: Scroll the Broads Manager screen down to the bottom, you will see A module called “esp8266 by esp8266 Community” (see following picture), select the latest version and click “Install“. The ESP8266 package has benn installed successfully. Note: You’d better close the Arduino IDE and restart it again.
Setup ESP8266 Support
![6.jpg](/proxy/?url=https://content.instructables.com/F97/U1S7/J7QGGU99/F97U1S7J7QGGU99.jpg&filename=6.jpg)
![7.jpg](/proxy/?url=https://content.instructables.com/FQI/6TB5/J7QGGU9J/FQI6TB5J7QGGU9J.jpg&filename=7.jpg)
When you’ve restarted, select NodeMCU 0.9 (or NodeMCU 1.0) from the Tools->Board dropdown Config the Board menu and choose the right Port for your device. CPU Frequency:80MHz,Flash Size:4M(3M SPIFFS),Upload Speed:115200 Now just proceed as the Arduino: Start your sketching! Note: 115200 baud upload speed is a good place to start – later on you can try higher speeds but 115200 is a good safe place to start.