The ESP8266 Module controls the relay status

The ESP8266 Module controls the relay status

ESP8266 is a low-power UART-WiFi module. It can be widely used in many aspects such as smart power system, smart transportation, smart home, handheld devices, industrial control and so on. This module uses 3.3V power supply, and supports the wireless 802.11 b/g/n standard. In addition, the WiFi module has three operating modes, namely STA, AP and STA + AP
The following is a using routine about this ESP8266 WiFi module on the Arduino platform .










The PC software “USR-TCP232-Test.exe” send control commands via the WiFi wireless network to change the relay module. Then the status of the relay module will be returned to the computer through ESP8266.


  • 1* Adeept UNO R3 Board
  • 1* USB Cable
  • 1* Relay Module
  • 1* RGB LED
  • 1* Breadboard
  • 1* WiFi Router
  • Several Jumper Wires

1. Build the circuit

2. Network Configuration
Run the software USR-TCP232-Test.exe on your computer, then enter the following configuration information:AdeeptData

3.Program  AdeeptESP8266Relay.ino:

File name:   AdeeptESP8266Relay.ino
Description: Arduino receive wifi data and then control relay
Author:      Tom
Date:        2017/01/16 

int RelayPin   = 8;    //   Relsy module connected to digital pin 8  

void setup()    
   Serial.begin(115200);       // set up a wifi serial communication baud rate 115200
   pinMode(RelayPin, OUTPUT);    // sets the RelayPin to be an output 
   Serial.println("AT+CWMODE=3");//set to softAP+station mode
   delay(4000);     //delay 4s
   Serial.println("AT+RST");     //reset wifi
   delay(4000);     //delay 4s
   Serial.println("AT+CWJAP=\"MERCURY_BE90\",\"adeept1205\"");   //replace "MERCURY_BE90" to your WiFi AP name(SSID), replace "adeept1205" to your WiFi password
   delay(4000);     //delay 4s
   delay(4000);     //delay 4s
   Serial.println("AT+CIPSTART=\"TCP\",\"\",8080");   //TCP Protocol, server IP addr, port
   delay(4000);     //delay 4s
   delay(4000);     //delay 4s
   Serial.println("AT+CIPMODE=1");//Open transparent mode
   delay(4000);     //delay 4s
   Serial.println("AT+CIPSEND");  //Starting transparent mode
   delay(4000);     //delay 4s
   Serial.println(" Adeept_wifi connection is successful! ");//wifi send 'Adeept_wifi connection is successful!'

void loop()   
         case '1': digitalWrite(RelayPin,HIGH); //drive relay open conduction
                   Serial.println("Relay Open ");//Adeept wifi send Relay status 'Relay Open'
         case '2': digitalWrite(RelayPin, LOW);  //drive the relay is closed off
                   Serial.println("Relay Close ");//Adeept wifi send Relay status 'Relay Close'
         default:  break;

4.Compile the program and upload to the Adeept UNO R3 board

When downloading the program, please disconnect the communication port(URXD , UTXD) of ESP8266 from Adeept UNO R3 Board. After the program is completed, connect the ESP8266 communication port(URXD , UTXD) to Adeept UNO R3 Board.Otherwise the program download may fail.

6.Observe the experimental phenomena

Send different character to the Adeept UNO R3 Board via WiFi. Such as and “2”.

50 Replies to “The ESP8266 Module controls the relay status”

  1. Here at Leslie’s Pugsland Breeder, Our beautiful fawn pug has given birth to 4 healthy Pug puppies.
    She is our beloved family dog and this is her 1st litter.
    Both mum and dad are AKC registered with 5 gen pedigree certificate. Both from Top Champion bloodlines.Mum and Dad can be seen. Puppies have been wormed weeks 2,4,6,8 and will have had a flea preventative treatment before leaving us.
    They will have their vet check, 1st vaccinations and microchip.
    To view all available puppies and recent pictures, Search us in google as LESLIE’S PUGSLAND BREEDER or click on our website link bellow :
    Pug Puppies for sale | pug for sale near me | pug puppy for sale | pug puppy | pug for sale | pug puppies for sale in va | black pug puppies for sale

  2. Pingback: best free vpn
  3. Pingback: michigan cornhole
  4. Pingback: Dank memes
  5. Pingback: trucks for sale
  6. Pingback: czyj to numer
  7. Pingback: mephedrone analog
  8. Pingback: Get More Info
  9. Pingback: Fiona
  10. Pingback: Adrianna
  11. Pingback: hebamme bewertung

Leave a Reply