Getting Starting - Changes to the Seeed Tutorial
After a 3 or 4 week wait, your ESP8266 Serial Wifi modules have finally arrived from China. Now what?
For a first program, most people head for the short tutorial at seeedstudios
The Seeed tutorial is written for the version 1 module with a 57600 baud rate serial link. The version 2 module that is currently shipping runs at 115200 bps.
Also, the version 2 module requires 5 connections rather than the 4 shown in the tutorial. You need to pull the chip-enable (CH_PD) pin high - by connecting it to a 3.3V source via a (say) 10k resistor. The CH_PD pin is to the right of the TXD pin shown in the Seeed tutorial. (Be smart and google for an exact match to your module before wiring up.)
The tutorial uses an Arduino UNO variant. Because the module link runs at 115200, you have to use a hardware UART (serial) module to talk to it. On the UNO this is a problem, as the Uno only has one UART module. The tutorial program therefore uses a soft serial port to communicate with the monitoring PC (via an FTDI/Max232 or other TTL/Serial or TTL/USB converter).
The soft serial port can only run up to 19200 bps. You'll very quickly find that if you attempt to suck data from the WiFi module at 115k and blow it to the PC at 19k, the buffers on the WiFi module will rapidly fill and your TCP connection will be dropped.
You can save yourself a lot of hassle by picking up an Arduino Mega 2560 with 4 hardware UART modules. ("Inland" branded clones are available from Microcenter for $20.) This allows you to forward data to the monitoring PC at the same rate as it's received from the WiFi module. (A $20 Teensy 3.1 might be even better - see Conclusions below.)
In this photo you can see pins TX3, RX3,TX2,RX2,TX1,RX1 at the top right of the board. They are the transmit (TX) and receive (RX) connections for hardware UART3, UART2 & UART1. UART0 is connected to the USB port (and is broken out to the left of TX3).
Note also that in the Seeed tutorial the WifiModule is connected directly to the Arduino's TX & RX pins. You might get away with this, but you might not, and then you'll have to wait another 3 or 4 weeks for a new module. I converted the 5V serial signal from my Mega 2560 to 3.3v using a Sparkfun bi-directional level converter module. These cost about $3 and might save you tears.
On the subject of power, you'll need a separate 3.3V power supply. The WiFi module sucks more current that the 3V3 pin of an Arduino can supply.
To be ctd... If I can work out how to embed source code.