A NodeMCU board and Arduino development

The ESP8266 is a low-cost Wi-Fi chip from Chinese manufacturer Espressif

The ESP8266 commonly is found as a small module allows microcontrollers to connect to a Wi-Fi network and make simple TCP/IP connections using Hayes-style commands. However, at the time there was almost no English-language documentation on the chip and the commands it accepted.

The very low price and the fact that there were very little external components on the module which suggests that it could eventually be very inexpensive in volume, attracted many hackers to explore the module, chip, and the software on it, as well as to translate the Chinese documentation

Features

  • 32-bit RISC CPU: Tensilica Xtensa LX106 running at 80 MHz*
  • 64 KiB of instruction RAM, 96 KiB of data RAM
  • External QSPI flash – 512 KiB to 4 MiB* (up to 16 MiB is supported)
  • IEEE 802.11 b/g/n Wi-Fi
    • Integrated TR switch, balun, LNA, power amplifier and matching network
    • WEP or WPA/WPA2 authentication, or open networks
  • 16 GPIO pins
  • SPI, I²C,
  • I²S interfaces with DMA (sharing pins with GPIO)
  • UART on dedicated pins, plus a transmit-only UART can be enabled on GPIO2
  • 1 10-bit ADC

Setup Arduino

Starting with 1.6.4, Arduino allows installation of third-party platform packages using Boards Manager. We have packages available for Windows, Mac OS, and Linux (32 and 64 bit).

Install Arduino 1.6.5 from the Arduino website.
Start Arduino and open Preferences window.
Enter http://arduino.esp8266.com/stable/package_esp8266com_index.json into Additional Board Manager URLs field.
Open Boards Manager from Tools > Board menu and install esp8266 platform. this may take a while.
Selecting the board

Here is a screen capture of the settings I used in the Arduino IDE, your settings may differ slightly

 

nodemcu

 

You will see the board I purchased below, as you can see I have selected it. On my PC the NodeMCU was on Com 35 (I’ve connected a lot of deveopment boards to this rig). the other settings I left as they were

 

My board

A fairly low cost board this one, its clearly marked and you will notice that this one uses the CH340 chip

NodeMCU-v0.9

Code

This is just a blink example

[codesyntax lang=”cpp”]

void setup() 
{
pinMode(D1, OUTPUT);
}

// the loop function runs over and over again forever
void loop() 
{
//flash an led connected to D1
digitalWrite(D1, LOW); 
delay(1000); 
digitalWrite(D1, HIGH); 
delay(1000); 
}

[/codesyntax]

 

Links

The board pictured earlier comes in at about $7, so wont break the bank in any way.

NodeMcu Lua WIFI Internet of Things development board based ESP8266