Internet of Things (IoT) –
Architecture, Communication Technology, and Applications
(EED-379)
Dr. Rohit Singh 1
ESP8266 NodeMCU
Dr. Rohit Singh 2
Dr. Rohit Singh 3
ESP8266 NODEMCU
• The ESP8266 is a $4 (up to $10) Wi-Fi module.
• It allows you to control inputs and outputs as you
would do with an Arduino, but it comes with Wi-Fi.
• So, it is great for home automation/internet of things
applications.
So what can you do with this low cost module?
• create a web server
• send HTTP requests
• control outputs
• read inputs and interrupts
• send emails ESP8266 specifications
• post tweets • 11 b/g/n protocol
• Wi-Fi Direct (P2P), soft-AP
• Integrated TCP/IP protocol stack
• Built-in low-power 32-bit CPU
• SDIO 2.0, SPI, UART
NodeMCU is an open-source Lua based firmware and development board specially targeted for
IoT based Applications.
Dr. Rohit Singh 4
Versions of ESP8266 NODEMCU
We highly recommend using the ESP8266-12E NodeMCU Kit, the one that has built-in programmer and
lots of GPIOs. The built-in programmer makes it easy to prototype and upload your programs.
Dr. Rohit Singh 5
NodeMCU ESP8266 Specifications & Features
• Microcontroller: Tensilica 32-bit RISC CPU Xtensa LX106
• Operating Voltage: 3.3V
• Input Voltage: 7-12V
• Digital I/O Pins (DIO): 16
• Analog Input Pins (ADC): 1
• UARTs: 2
• SPIs: 1
• I2Cs: 1
• Flash Memory: 4 MB
• SRAM: 64 KB
• Clock Speed: 80 MHz
• USB-TTL based on CP2102 is included onboard, Enabling Plug n Play
• PCB Antenna
Dr. Rohit Singh 6
ESP8266-12E Board
Dr. Rohit Singh 7
ESP8266-12E Pinout
Dr. Rohit Singh 8
ESP8266-12E Pinout
Dr. Rohit Singh 9
Programming to NodeMCU
Step 1: 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.
Step 2: 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. Now
install the driver.
Step 3: Install the Arduino IDE Syllabus
Step 4: Install the ESP8266 Board Package
In your Arduino IDE, go to File> Preferences
Dr. Rohit Singh 10
Programming to NodeMCU
Step 5: Enter http://arduino.esp8266.com/stable/package_esp8266com_index.json into the
“Additional Boards Manager URLs” field as shown in the figure below. Then, click the “OK”
button:
Dr. Rohit Singh 11
Programming to NodeMCU
Step 6: Open the Boards Manager. Go to Tools > Board > Boards Manager…
Dr. Rohit Singh 12
Programming to NodeMCU
Step 7: Search for ESP8266 and press install button for the “ESP8266 by ESP8266
Community“:
Dr. Rohit Singh 13
Your First Program
Syllabus
Dr. Rohit Singh 14
Syllabus
Dr. Rohit Singh 15