Arduino Basics: Getting Started with the Keyes ESP-13 WiFi Shield

14 September 2018

Getting Started with the Keyes ESP-13 WiFi Shield


This tutorial will help you get started with the KEYES ESP-13 WiFi Shield.

The ESP-13 WiFi Shield is compatible with an Arduino UNO and has the same form-factor. Essentially this shield will give your Arduino project WiFi capabilities. While it interfaces nicely with the Arduino, it can operate without it. However, if I were planning on using the shield independantly, then I probably would opt for an ESP module rather than a shield.

I bought my shield from Jaycar (CAT.NO: XC4614), however you can get it much cheaper from other online retailers at about a quarter of the price. The instructions on the Jaycar website are not that good, and at first I thought I had bought myself a useless product. It just didn't seem to work regardless of what I tried. There were some tutorials online that gave me hope, only to find that my shield was not quite the same and therefore I did not get the same results. But after countless hours of trial and error and patching various bits of knowledge together, I finally worked out how to use this shield. Everything has fallen into place. And it is easier that you would think... let me show you how.

Parts Required

  1. Arduino UNO (or compatible board)
  2. KEYES ESP-13 WiFi Shield - from Jaycar (Cat. No: XC4614)
  3. USB cable - to connect Arduino to Computer
  4. 4 wires: 4 x Male to Male connectors

Libraries and IDE

Arduino IDE

While there are many Arduino IDE alternatives out there, I would recommend that you use the official Arduino IDE for this project. I used the official Arduino IDE app (v1.8.5) for Windows 10.
Make sure to get the most up-to-date version for your operating system here.

Upload BareMinimum Sketch

Upload a BareMinimum Sketch to the Arduino UNO (or compatible board) before making any connections to the ESP-13. We want to upload the BareMinimum sketch because we don't want the Arduino UNO interfering with our setup in anyway. Here is how to do that:

  1. Start your Arduino IDE
  2. Connect the Arduino UNO to the Computer using a USB cable
  3. Select: File > New (or Ctrl + N)
  4. Select: File > Examples > 01.Basics > BareMinimum
  5. Select: Tools > Board > Arduino/Genuino UNO
  6. Select: Tools > Port > COM4 (Your Arduino may be on a different COM port)
  7. Select: Sketch > Upload (or Ctrl + U) - or click on right arrow symbol
  8. After the sketch has uploded. Disconnect the USB cable from the computer/Arduino.

IDE Configuration for ESP-13

Now for the fun part. The ESP-13 WiFi Shield is itself a microcontroller, however, the Arduino IDE is not by default, configured to communicate with or program the ESP-13 WiFi Shield. We are about to change that:

  1. Select File > Preferences from the Arduino IDE menu (or Ctrl+Comma)
  2. Insert the following text into the Additional Boards Manager URLs field:
    If there is a URL in that space already, then insert a comma, and append the URL to the end:

  3. Once the URL is added, press OK.
    This will allow us to install the ESP8266 package in the next step.

Installing the ESP8266 board

  1. Select: Tools > Board: "xxxx" > Boards Manager
  2. Search for ESP8266 using the Search bar
  3. Select the "esp8266 by ESP8266 Community" board from the list.
  4. Select the latest or most up-to-date version from the drop-down box (eg. 2.4.2)
  5. Press the Install button.
  6. Make sure that the esp8266 board is installed. Then press the "Close" button
  7. Choose the ESPDuino(ESP-13 Module) from the ESP8266 Modules list:
    Tools > Board: "xxxx" > ESPDuino(ESP-13 Module)

ESP-13 Flash Settings

You will then want to check that you have the following settings in the Tools menu of the Arduino IDE:

  • Board: "ESPDuino (ESP-13 Module)"
  • Flash Size: "4M (1M SPIFFS)"
  • Debug port: "Disabled"
  • Debug Level: "None"
  • IwIP Variant: "v2 Lower Memory"
  • Reset Method: "ESPduino-V2"
  • VTables: "Flash"
  • CPU Frequency: "80MHz"
  • Upload Speed: "115200"
  • Erase Flash: Only Sketch
  • Port: - (we will select that later)

The Arduino IDE is now able to communicate with, and program the ESP-13 WiFi shield.
Now let us have a look at how to use the default AI-Thinker AT-firmware that comes pre-loaded on the shield.

Preparing the WiFi Shield for Communication

The Keyes ESP-13 WiFi shield comes pre-loaded with AI-Thinker firmware. I thought I just had to place the WiFi shield on top of the Arduino UNO, and I should be able to send through some AT commands via the Serial monitor. Yes - it is a shield, and yes, we will use it as a shield later on, but if you want to use the Serial monitor while the shield is sitting on-top of the Arduino UNO, you will need to make use of the SoftwareSerial library. You can go down this path, but it is cumbersome. There is a better way. We will still need the Arduino UNO, but we need to connect it to the ESP-13 Shield in the following manner:

Wire Connections

  1. Make sure that the Arduino UNO is OFF (i.e. not connected to power or USB port)
  2. Place the ESP-13 WiFi shield NEXT TO the Arduino UNO
  3. Connect a Red wire between 5V on Arduino UNO, and 5V (Arduino side) of the ESP-13 shield
  4. Connect a Black wire between GND on Arduino, and G (Arduino side) of the ESP-13 shield
  5. Connect a Green wire between D0(RX) on Arduino, and TX (UART - Arduino side) of ESP-13
  6. Connect a Yellow wire between D1(TX) on Arduino, and RX (UART - Arduino side) of ESP-13
  7. Make sure that both of the switches on the ESP-13 WiFi Shield are in the "ON" position.

Serial Monitor Setup

  1. Plug the USB cable into the computer, and the other end into the Arduino
  2. You should see a Red LED ignite on the ESP-13 Shield.
  3. In your Arduino IDE, make sure the correct COM port is selected:
    Tools > Port > COM4 (Arduino/Genuino UNO) - your port may be different.
  4. The IDE recognises that an Arduino is using that COM port, even though ESP-13 Board selected
  5. Open the Serial Monitor: Tools > Serial Monitor (or Ctrl + Shift + M)
  6. Select: Both NL & CR from the drop-down box at the bottom right side of the Serial Monitor.
  7. Select: 115200 baud from the other drop-down box in the Serial Monitor window.
  8. Press the RESET (RST) button on the bottom left of the ESP-13 WiFi Shield.
  9. You may see some garbled information come through, but you should see "Ai-Thinker Technology Co.,Ltd" and "ready" messages in the debug window.
  10. You can now send through your AT-commands to the ESP-13 WiFi shield.

Using default AI-Thinker AT-firmware

Now is a good time to test the AI-Thinker AT-firmware. It is possible to program the Arduino to send a sequence of AT commands to the ESP-13 WiFi Shield, but for demonstration purposes, I will show you how to send the commands manually via the Serial monitor.

  1. If you see "ready" within the Serial Monitor window, the ESP-13 is ready to receive AT commands.
  2. Type: AT into the box at the top and press the Send button (or Enter)
  3. You should now see the AT command in the debug window, and a response "OK"

If you received the OK message, then your communication with the ESP-13 was successful.
A good list of AT commands and explanations can be found here.
Another list of AT commands can be found here.

The commands allow you to test, query and configure the ESP-13 shield. Essentially a command-line interface. Try out the following commands to get a feel for these functions/queries. The commands are in bold, and I placed some of the responses that I got in the line below.

  1. AT
    Response: OK

  2. AT+RST
    This resets the ESP-13 board. It provides some info about the board.

  3. AT+GMR
    AT version: (Aug 8 2015)
    SDK version: 1.3.0
    Ai-Thinker Technology Co.,Ltd.
    Build: Sep 11 2015

    +CIFSR:APIP, ""

    +CWMODE:2 [1=STA, 2=AP, 3=BOTH]


  7. AT+CWMODE=3

    +CWLAP:(3,"MYACCESSPOINT", -53, "xx:xx:xx:xx:xx:xx",6,-12)

So there you go. Now you have everything need to configure your ESP-13 WiFi shield. Once you are tired of playing around with AT commands, I will show you how to re-program and upload sketches to the ESP-13 WiFi Shield, and use it the way it was designed to be used (i.e. as a shield). To upload sketches to the Shield, you will need one extra wire. But I think that deserves to be another tutorial. Stay tuned.


In this tutorial, I showed you how to configure your Arduino IDE for the ESP-13 shield. I also explained how to wire the ESP-13 WiFi shield so that you can communicate with it using the Serial monitor. I hope this tutorial helped you in some way. If it did, please let me know in the comments below. I will be following up with another tutorial, which will show you how to upload sketches to the ESP-13 WiFi Shield, and free it from your computer.

Next Tutorial

Please click here for the next ESP-13 WiFi Tutorial. It will show you how to setup a simple webserver on your ESP-13 WiFi Shield and display a table of all of the WiFi Access Points within it's range.


Social Media

You can find me on various social networks:

Visit my ArduinoBasics Google + page.
Follow me on Twitter by looking for ScottC @ArduinoBasics.
I can also be found on Pinterest and Instagram.
Have a look at my videos on my YouTube channel.


  1. Hi Scott, just want to give you a big thanks for this tutorial. Its the first I have found that has everything in one place and I have searched relentlessly to find information on these ESP-13 wifi modules. I haven't carried out your instructions yet but I will let you know how I go but after reading the whole tutorial I can see what I need to do for the first time with clarity. Thanks heaps, regards Tulio Zarlenga

    1. Thank you for your feedback Tulio.
      Yes - please let me know how you go, and if I have left out any important information, please mention it.

  2. Hey Scott,
    thanks for this tutorial, I followed this and it worked perfectly. I reset the whole system and followed it again so I could commit it to memory and I no longer get “ready” in the serial monitor, do you know what might cause this?

    1. Have you still got the AI Thinker firmware installed on the ESP-13?
      Check Baud rate.
      Press reset button after opening the serial monitor.

    2. Does it still respond to "AT" commands ?

    3. The firmware is still there and the "ready" has returned, but it's not responding to the "AT" commands. Any thoughts?

    4. Perhaps re-install the firmware.


  3. excellent tutorial shows me the letters but I do not get it AT OK

    1. What happens when you send the AT command ?
      Do you get a response ?

    2. no. all process is same but when i send AT commands to shield, they did not respond.

    3. You will probably need to re-flash / re-install the AT firmware.

  4. Hey Scott, thanks for this tutorial very well done. The shield is ESP13shield de At the RESET he puts on the monitor at the end "Ai-Thinker Technology Co., Ltd.
    Invalid. The shield does not respond to AT commands. What should I do ?

    Thank you. Thierry Montpellier France

    1. Hi Thierry,
      It depends on whether you want to use AT commands or not.
      If you would like to use it as a normal Arduino WIFI shield, you could try this tutorial. However, if you want to use AT commands, you may need to re-flash/re-install the
      AT firmware.

  5. Hi Scott
    I followed this tutorial and was able to get the AT commands. I went on and tried to run the WiFi scanner code on your other tutorial, but got continuous giberish. I tried to backtrack by following the instructions on this page again, but am unable to get the "ready" point. Instead, I get gibberish here to. It looks like it's probably a baud rate problem. I have set baud rate for both the serial monitor and the board to various values, but nothing seems to work. Any suggestions?


    1. Hi Brian,
      In this tutorial - I had a lot of setup stuff on here, but really, it was to get ready for the next tutorial. The fact that you got AT commands working - essentially meant that you were able to successfully communicate with the board. So good that you have managed to get through step 1.
      On the other tutorial - I have a checklist of things to tick off.. So I would suggest that you double check each of them. The fact that you are seeing gibberish - is probably a good thing, because it means that you probably successfully transmitted the ESP code to the ESP board.
      In the ESP code, Serial.begin is set to 115200. So you must use this as the selected baud rate in the Serial monitor.
      Also don't forget the "Both NL and CR" selection in the serial monitor.
      You may experience a bit of gibberish at the beginning of the text in the serial monitor.
      You will see that I have some in my picture or diagram.
      If you are still experiencing issues with the tutorial.. I can walk you through the process in the new Discord server here:
      Just look for "ArduinoBasics" - that is me. I am sure you are 90% there. It is probably something simple. Like a cable, or insufficient power or something like that.

    2. Thanks Scott, I had similar issues with not responding to AT commands using an Arduino UNO. Works fine with my Freetronics EtherTen board though. Going to try with different USB cables and boards but it looks to be a power issue for me.

    3. Yes - ESP modules often suffer when there is insufficient power. Let us know how you go.


Feel free to leave a comment about this tutorial below.
Any questions about your particular project should be asked on my Arduino Tutorials Discord Server.

Comments are moderated due to large amount of spam.