ESP8266 ESP-12 Getting Started w/ Arduino Uno

Had trouble finding a complete guide to get my new ESP8266 / ESP-12 going. Lots of information out there but much conflicting info and most guides are missing something.

Here’s what worked for me with this particular ESP-12 board.

http://www.ebay.com/itm/281601716541?_trksid=p2057872.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT

If the Ebay listing is dead, the seller name is tomyuen007.

Plugged in the Arduino and uploaded the BareMinimum sample sketch.

On the ESP12 board, connect GPIO15 to GND. Then connect GPIO0, GPIO2, and CH_PD to VCC.

I used a two tiny breadboards because of the awkward spacing of the pins on the board.

ESP12_arduino-2

Connected ESP TX to Arduino TX.
Connected ESP RX to Arduino RX.

Opened Arduino Serial Monitor and set line ending to “Both NL & CR” and set baud to 115200.

Connected ESP12 GND to Arduino GND
Connected ESP12 VCC to Arduino 3.3V (Many sources say you need a dedicated power supply, but I didn’t have one and this is working so far.)

The ESP12 booted up immediately and I got a “ready” message, preceded by some gibberish.

arudino_esp12

I tried every baud rate and only 115200 gave me the ready message. All other settings gave me only gibberish.

More to come…

AT+GMR
AT version:0.21.0.0
SDK version:0.9.5
OK

Was going to check Wi-Fi settings on my phone and use them to configure the ESP when I noticed it was set up as an access point by default with SSID: AP-THINKER_FE2B43

Connected with Windows and checked IP address: 192.168.4.3 with gateway 192.168.4.1

Tried HTTP browser connection to 192.168.4.1 but connection refused.

AT Commmands to get going…

AT+CWMODE=1 – This changed the mode from AP to Sta
OK

AT+CWLAP – Lists access points. Before setting CWMODE, this would return error
+CWLAP:(3,”cowabunga”,-68,”f8:35:dd:75:12:1b”,1)
+CWLAP:(0,”cowabunga_guest”,-69,”fa:35:dd:75:12:1c”,1)
+CWLAP:(2,”hauntedpants”,-92,”00:18:e7:e7:1d:2c”,2)
OK

AT+CWJAP=”cowabunga_guest”,””
OK

AT+CWJAP?
+CWJAP:”cowabunga_guest”
OK

AT+CIFSR=?
OK

AT+CIFSR
+CIFSR:STAIP,”192.168.1.43″
+CIFSR:STAMAC,”18:fe:34:fe:2b:43″
OK

AT+CIPSTART=”TCP”,”rootpower.com”,80
CONNECT
OK

Published by

Leave a Reply

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

* Copy This Password *

* Type Or Paste Password Here *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>