Kendziorra - Arduino NodeMCU v2 ESP8266-12E Shield - BOOST up your Arduino!
Category: Arduino and ESP8266
Hits: 8039

User Rating: 5 / 5

Star ActiveStar ActiveStar ActiveStar ActiveStar Active

BOOST your Arduino with this Shield

(click thumbnail)
Wiring, information and demo output

 Amica NodeMCU V2 DEVKIT with ESP8266-12E

NodeNCU v2 Shield:
Boost up your Arduino with this cheap ESP8266-12E Shield.
Use the 32 bit RISC CPU with 4 Mb memory, WiFi STA and/or AP, 2-32 GB micro SD card, 7 free GPIO and 1 Analog ports, 2 LEDs and 1 button. Then you can use your Arduino for important things like reading sensors, controlling stepper motors, ... .

Hardware Serial/USB:
Total unhindered to use for firmware flash and the debug monitors. No fiddling with jumpers and buttons.

SoftwareSerial 3.3V ↔ 5V:
Using a 5V Arduino? Use a 3.3V↔5V (Bi-Directional) 'Level Converter' to save your ESP8266.

Pull-up resistor:
Use a 10 kΩ pull-up resistor on te SS (Chip Select) line.

SD Filesystem:

 Demo sketches with Serial and Arduino SD library on the next two pages.


/*  DEMO Arduino + NodeMCU Shield
 *   With softwareSerial and micro SD
 *   Edited SD and SoftwareSerial examples

#include <SPI.h>             //
#include <SD.h>              //
#include <SoftwareSerial.h>  //
#include <Streaming.h>       //

File root;
SoftwareSerial serial(D1, D2, false, 128);  // RX-D1->UNO-TX, TX-D2->UNO-RX

void listFiles();
void printDirectory(File, int);
void show(String);

void setup() {
  Serial.begin(115200);  // to monitor (DEBUG)
  serial.begin(38400);   // to Arduino
  while (!Serial) {};    // wait for serial port to connect. Needed for native USB port only
  for (uint8_t t = 5; t > 0; t--) { 

  show("\n\nESP8266 Software serial test started\n");
  show("\nType text to send...\n");

void loop() {
  while (serial.available()) Serial << serial.readString();  // from Arduino
  while (Serial.available()) serial << Serial.readString();  // from ESP8266 Monitor to Arduino

void listFiles() {
  show("_______________________\nInitializing SD card...\n");
  if (!SD.begin(D4)) {
    show("initialization failed!\n");
  show("initialization done.\n");
  root ="/");
  printDirectory(root, 0);
  show("SD card done!\n_______________________\n\n");

void printDirectory(File dir, int numTabs) {  // get a list of SD files 
   while(true) {
     File entry =  dir.openNextFile();
     if (! entry) {
       // no more files
     for (uint8_t i=0; i<numTabs; i++) {
     if (entry.isDirectory()) {
       printDirectory(entry, numTabs+1);
     } else {
       // files have sizes, directories do not
       show(String(entry.size(), DEC) + "\n");

void show(String s) {  // show it on Arduino and ESP8266 monitors
  Serial << s;
  serial << s;


/*  DEMO Arduino + NodeMCU Shield
 *   With softwareSerial and micro SD
 *   Edited SoftwareSerial example

#include <SoftwareSerial.h>
// using If lost characters then try AltSoftSerial
//              =====
//#include <AltSoftSerial.h>  // 
#include <Streaming.h>  //

SoftwareSerial serial(8, 9); //  RX-D8->ESP-TX, TX-D9->ESP-RX
//AltSoftSerial serial; //  RX-D8->ESP-TX, TX-D9->ESP-RX

String inBuf = "";

void setup() {
  while (!Serial) {}  // wait for serial port to connect. Needed for native USB port only
  char s[] = "\n\nArduino Software serial test started\n";
  Serial << s;
  serial << s;
  Serial << "Wait for ESP8266 message...\n";

void loop() {
  while (serial.available()) Serial << (serial.readString());  // from ESP8266
  while (Serial.available()) serial << (Serial.readString());  // from Arduino Monitor to ESP8266