Last Updated on
Internet of Things WiFi Development Board:
NodeMcu is an open source IoT platform also very easy use. It includes Lua scripting language based firmware which runs on the ESP8266-12E Wi-Fi SoC from Espressif Systems. The term “NodeMcu” by default refers to the firmware rather than the dev kits. The NodeMcu also has micro USB port to connect to PC using micro USB cable .NodeMcu can be programmed using Arduino IDE.
The Node-Mcu Development Board based on ESP8266 which has :-
- 17 GPIO
- PWM (Pulse Width Modulation)
- 1-Wire ADC
- Power the development in the fastest way of combination with Node-Mcu Firmware.
How to flash a Firmware to NodeMcu:
- Download the ESP8266 Flasher from here
- Download Latest firmware from here
- Connect your NodeMcu Dev Board to Laptop using USB cable
Open ESP8266 Flasher Select COM port on which NodeMcu is connected to Laptop.
Goto advance setting and select baud rate,flash size etc
Goto configure click on setting to select latest binary flash to NodeMcu
next is > click on flash button to flash firmware
Image credit:- GitHub
- General Purpose Input/output Interface (GPIO)
- NodeMcu has 17 GPIO pins
- GPIO pins also Multiplexed with other functions, like I2C, I2S, UART, PWM, IR Control, LED and Button, etc.
- analogRead(A0) or analogWrite(pin, value) –To read or Write on analog pin.
- pinMode, digitalRead, and digitalWrite – Digital IO Configuration.
- Serial Peripheral Interface (SPI/HSPI): Node-Mcu has three SPIs.
- One general Slave/Master SPI
- One Slave SDIO/SPI
- One general Slave/Master HSPI
- I2C Interface
- one I2C that can be connected to microcontroller and other peripherals such as sensors.
- Both I2C Master and I2C Slave are supported.
- I2C can be realized via software programming, and the clock frequency is 100 kHz at a maximum.
- Timing and delays
- millis() and micros() return the number of milliseconds and microseconds elapsed after reset, respectively.
- delay(ms) pauses the sketch for a given number of milliseconds and allows WiFi and TCP/IP tasks to run. delayMicroseconds(us) pauses for a given number of microseconds.
The list of IO index number assigned to each GPIO as per below table.
|GPIO Pin||I/O Index Number|
Documents for detail study