By | November 25, 2017
Step 1: Turn On Your ESP8266 Module by Using Arduino Nano 3.3V Dc Output Pin. Remeber sometimes Arduino board is not delivering sufficient voltage to the ESP8266 module. You can use a 3.3 V ( Do not exceed input voltage from 3.3v) regulator ( AMS1117 ) to power this module. A voltage divider circuit is used to drop the Arduino 5V to ESP8266 3.3 V.
 

Step 2: Here is the schematic Diagram, in my code I used Digital pin 2 as a Tx and D3 as an RX. 

Setup-ESP8266-Arduino IDE
Step 3: Open Arduino IDE and Paste the given code in the window just like shown in the picture. 
#include <SoftwareSerial.h>
SoftwareSerial softSerial(3, 2); // RX, TX
 
void setup() 
{
  uint32_t baud = 9600;
  Serial.begin(baud);
  softSerial.begin(baud);
  Serial.print(“SETUP!! @”);
  Serial.println(baud);
}
 
void loop() 
{
    while(softSerial.available() > 0) 
    {
      char a = softSerial.read();
      if(a == ”)
        continue;
      if(a != ‘r’ && a != ‘n’ && (a < 32))
        continue;
      Serial.print(a);
    }
    
    while(Serial.available() > 0)
    {
      char a = Serial.read();
      Serial.write(a);
      softSerial.write(a);
    }
}
Step 4: Open Serial Monitor and Set Your Baud rate to 9600.

 

Step 5: You are ready to send At Commands to Your ESP8266 Module. Remember you will see a Garbage value during Serial Communication.
  • AT – Will give OK on the serial monitor, if Not just unplug vcc Pin of ESP8266 Module for a moment and reconnect again.
  • Send AT+RST – Command to Restart module / Optional Command

 

  • Send AT+GMR – To get the firmware version
  • Send AT+CWMODE? – Set Module to a Dual Mode Sucha as Standalone + Access Point mode.
  • Send AT+CWLAP – Command to Search Nearby Wifi Access Point. Find your Wifi Name in the Search Result.
  • Send AT+CWJAP=”Your Wifi Name”,”Your Wifi Password” – Command to Connect to WIFI.
  • Send AT+CIFSR – Command to Check Allocated Ip given by your Wifi to your ESP8266 Module/Optional Command.

 

Setup-ESP8266-Arduino IDE
Category: Arduino

About Abid Jamal

Abid Jamal Received his B.S. Degree in Electronics & Communication in 2014 (Gold Medalist) from University of Lahore, Islamabad, Pakistan and Master’s Degree in Electrical Engineering from Capital University of science and technology, Islamabad, Pakistan, in 2016. He is the Creator of www.Electronicslovers.com website. Awarded by “A” grade in Electronic & circuits MIT online certificate. He achieved an academic Excellence certificate in the year 2014. He received Dean Honor Roll award for earning GPA 3.67, Spring-2015 in MSEE. He has done many projects using Different kinds of microcontroller. His research interests include Radar Cross Section measurements, Smart Grid communications, Intelligent transportation systems, driver-less car, cellular mobile communication & networks, improve Smartphone’s battery life for 3G+LTE user’s, and embedded systems.

5 Replies to “Learn How to Setup the Wifi Module ESP8266 by Using Just Arduino IDE”

  1. John Lee

    Hi there,

    I followed the methods and uploaded the code accordingly.
    Yet when I was at the serial monitor, I was not able to get any feedback from the module itself when I typed AT.

    I disconnected the 3.3V and still have no feedback when i reconnected.

    Is there a chance I may have burned the module?

    Regards
    John

    Reply
    1. Abid Jamal Post author

      Check Connections , Arduino Comport IDE and lastly everyone knows Esp8266 is very Sensitive to Input DC Voltage. Kindly replace Esp8266 module and try Again. Fur Further information Contact us through our Instagram page ( @electronicslovers)

      Reply
      1. John Lee

        Thanks for the reply Jamal!

        I currently have no extras available.
        IS there a way to check if its really fried?

        Reply
          1. John Lee

            Apologies Jamal but what you had given me was another type of arduino to test if my module is working… is there one that works with uno instead?

            Regards

Leave a Reply

Your email address will not be published. Required fields are marked *