Getting started with ESP-13 sheild (ESP8266)

If you have the ESP-13 that I have (https://d3s5r33r268y59.cloudfront.net/69193/products/thumbs/2015-11-06T02:09:32.056Z-TB1jEKcJpXXXXa_XXXXXXXXXXXX_!!0-item_pic.jpg.2560x2560_q85.jpg) then there are some things you need to know.

Mount it to an Arduino, and power it up.

If you aren’t sure if it’s configured, hold down the KEY button for at least 5 seconds, the unit will be fully reset.

Then, use a computer or phone to connect to its WIFI server, in the following manner:

  1. Both switches OFF for programming
  2. Power on Arduino
  3. Using computer or phone Wifi, connect to DOITWiFi_Config
  4. Fill out operational parameters (RST for 5s will reset)
  5. Connect to 192.168.4.1 with a web browser.

You can then configure the unit to function either as a server (where clients connect to it) or as a client (where it connects to a target.) My students are going to be using it as a client, so here’s the outline of how to do that:

Leave Access Point (AP) config as-is - only needed for SERVER mode.

Set Station as follows:

a.  Use AP List to find the Access Point you want to use
b.  Set the AP password to the AP WEP password
c.  DHCP Enable is YES
d.  STA IP, Netmask and Gateway are not editable - they're received via DHCP

Set NetWork Setting as follows:

Socket Type:  Client
Transport Type:  TCP
Remote IP:  <IP address of the host you want to communicate with>
Local Port:  <port of the host you want to contact>

Click SUBMIT

You communicate with the WiFi board using the Serial device, as if you were using the console. You can, in fact, monitor the traffic via the USB serial console.

When you are ready to use the access point, flip the switches ON. This enables the TX and RX lines.

You now talk to the remote application like you’d talk to someone on a keyboard via the USB serial console. Your normal sends and receives will work as you would expect. Set your speed with Serial.begin(9600) which is the default for the ESP-13. Of course, you can change that, but Arduinos are going to be transmitting small amounts of data, so generally the baud rate isn’t that critical.

NOTE: the switches link the WIFI module to the RX (pin 1) and TX (pin 0) lines, the same ones that are normally connected to the board’s USB interface. BOTH switches UP means the WiFi board is able to talk to the Arduino. Both switches DOWN means that the board cannot talk to the Arduino. Enabling only ONE switch would permit either TX or RX, if you only needed that.

NOTE: YOU MUST TURN THE SWITCHES OFF IF YOU ARE PROGRAMMING OTHERWISE THE IDE WILL FAIL TO PROGRAM THE ARDUINO.