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:
- Upload the following sketch to your Seeeduino:
void setup() { pinMode(0,INPUT); pinMode(1,INPUT); } void loop() { }
- Open the serial console of the Arduino IDE and set the baudrate to 115200
- Now wire the ESP to your arduino:
ESP8266 Seeeduino GND GND VCC+CH_PD V3.3 URXD RX (pin 1) UTXD TX (pin 2) - 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"
