Site icon 14core.com

Wiring & Programming ESP8266 12/12E / NodeMCU as WiFi Remote Client/Server Mode

Another illustration how to wire the ESP8266 as server and client mode, therefore there is no need to use a router or smart phones to interact/communicate to the ESP8266, this is direct communication between 2 ESP module as server and client mode, ones the code is loaded the ESP8266 coded as server the client ESP8266 will automatically connect to the ESP8266 Server Access Point. As you can see the diagram on the ESP8266 client the push button is attach to pin D2 map on Arduino as GPIO pin 4 when button is pressed it will send a command to the server as value of 1 then the server will turn the D2/GPIO 4 to HIGH then LED light will turn on.

Required Components

Wiring Guide

Programming / Flashing the ESP8266 12/12E
You need to install Arduino 1.6.8 from the Arduino website. available for Windows, Mac OS, and Linux (32 and 64 bit).
Open Arduino IDE and open the Preferences window then add {http://arduino.esp8266.com/stable/package_esp8266com_index.json} without bracket into Additional Board Manager URLs field. Note you can add multiple url separating them with commas. >  http://arduino.esp8266.com/stable/package_esp8266com_index.json

Or you can follow this steps. http://www.14core.com/arduino-ide-with-esp8266-integration-for-ease-programming/

Source Code for Server
[crayon-67344f0f7b775962970655/]
Source Code for Client
[crayon-67344f0f7b782070553030/]
Downloads

 

Wiring & Programming ESP8266 12/12E / NodeMCU as WiFi Remote Client/Server Mode
Exit mobile version