ESP8266: Using a seeeduino to talk to the ESP8266 module directly

Do you like this post? Writing posts, developing libraries and programming online font creators is actually hard work. I order most of my electronics from a Chinese website called Banggood. It is save and the items usually arrive in good quality. With every order you do there by following this link you are supporting the blog. Thank you!

I recently received two of these shiny new Wifi modules from China and had to test them out. In many posts around the web they say you should use a serial-to-usb adapter to send some AT commands to the module and set it up with your local access point. My problem was: I didn’t have such an adapter, or so I thought. It turns out you can use some types of Arduino’s for the job just fine. I had a Seeeduino V3.0 laying around and that piece of hardware really has a few features built in that I wasn’t aware of before. This is a short explanation on how to setup the Seeeduino to talk to the ESP8266:

  1. Upload the following sketch to your Seeeduino:
    void setup()
    {
    pinMode(0,INPUT);
    pinMode(1,INPUT);
    }
    void loop()
    {
    }
    
  2. Open the serial console of the Arduino IDE and set the baudrate to 115200
  3. Now wire the ESP to your arduino:

    ESP8266 Seeeduino
    GND GND
    VCC+CH_PD V3.3
    URXD RX (pin 1)
    UTXD TX (pin 2)
  4. Now send some AT commands for testing (bold is the request, light comments and response):
    AT
    OK
    AT+RST         // resets the module
     ets Jan  8 2013,rst cause:4, boot mode:(3,6)
    
    wdt reset
    [..]
    csum 0xbd
    AT+CWLAP       // lists all access points     
    +CWLAP:(0,"",0)
    +CWLAP:(3,"ap1",-90)
    +CWLAP:(0,"ap2",-87)
    AT+CWJAP="ap1","mypwd"     // join access point ap1 with password mypwd
    OK
    AT+CWJAP?     // show connected access point
    +CWJAP:"ap1"
    

Posted by squix78

Leave a Reply