0% found this document useful (0 votes)
1 views25 pages

Arduino Shield 4 Real

This tutorial provides a step-by-step guide on setting up a simple web server using the ESP-13 WiFi Shield with an Arduino UNO. It explains how to configure the Arduino IDE, wire the shield, upload code, and interact with the web server to display nearby WiFi access points. The tutorial aims to help beginners understand the basics of using the ESP-13 WiFi Shield and encourages further exploration of more advanced web server functionalities in future tutorials.

Uploaded by

Leonard Medica
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views25 pages

Arduino Shield 4 Real

This tutorial provides a step-by-step guide on setting up a simple web server using the ESP-13 WiFi Shield with an Arduino UNO. It explains how to configure the Arduino IDE, wire the shield, upload code, and interact with the web server to display nearby WiFi access points. The tutorial aims to help beginners understand the basics of using the ESP-13 WiFi Shield and encourages further exploration of more advanced web server functionalities in future tutorials.

Uploaded by

Leonard Medica
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Arduino Basics: ESP-13 WiFi Shield Web Server [Link]

html

Više Izradi blog Prijava

Arduino Basics
An Arduino tutorial blog. Free Arduino tutorials for everyone !

Home Arduino Basics Projects Page Arduino IDEs and Interfaces Arduino Tutorial Site List Forum Contact Author

17 September 2018 Search This Blog

ESP-13 WiFi Shield Web Server Search

Translate

Select Language

Powered by Translate

BUY ME A COFFEE

If you like my content, or if this


tutorial has helped you in any way,
please feel free to buy me a
coffee.

Description

1 of 25 8/21/20, 4:24 PM
Arduino Basics: ESP-13 WiFi Shield Web Server [Link]

If you are just getting started with the ESP-13 Wifi Shield from Jaycar, I would encourage you to have Go to my latest tutorial (NEW)
a look at my "getting started with the ESP-13 WiFi shield" tutorial. It explains in great detail how to Joystick and 8x8 LED Matrix
configure your Arduino, the IDE and the WiFi shield, and is a good pre-cursor for any of my ESP-13
WiFi shield tutorials (including this one).

This tutorial 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 (and refreshed every 5 seconds).
The ESP-13 shield will create it's own WiFi access point, which means that you can take this project
Pages
anywhere you want to. You do not have to be connected to your home/work WiFi network to see the
webpage. The limitation however, is that your device must be within WiFi range of the ESP-13 WiFi Arduino Basics Projects Page

shield in order to see the results of the WiFi scan. Arduino Basics YouTube Videos

Arduino Webserver Data Viewer


Let me show you how to put this project together:

Parts Required Subscribe (Feed)

Subscribe
1. Arduino UNO (or compatible board)
RSS Feed
2. KEYES ESP-13 WiFi Shield - from Jaycar (Cat. No: XC4614)
3. USB cable - to connect Arduino to Computer
Total Pageviews
4. 5 wires: 4 x Male to Male connectors and 1 x Female to Female Connector

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.

2 of 25 8/21/20, 4:24 PM
Arduino Basics: ESP-13 WiFi Shield Web Server [Link]

Arduino and IDE Setup


Make sure that your Arduino UNO has the BareMinimum sketch on it, and that you have configured
your Arduino IDE as per this tutorial.

Use the following as a checklist:

1. BareMinimum sketch loaded onto Arduino UNO


2. Additional Boards Manager URL list contains:
[Link]
3. Latest version of esp8266 board installed into Arduino IDE Boards Manager
4. ESPDuino(ESP-13 Module) has been selected as the Board in the Tools menu.
5. Make sure your ESP-13 Flash settings are correct
6. Set your Arduino IDE Serial Monitor to a Baud rate of 115200

Once again - please make sure you have completed all of the tasks in the list above.
Please look at this tutorial for further information.

3 of 25 8/21/20, 4:24 PM
Arduino Basics: ESP-13 WiFi Shield Web Server [Link]

Wiring up the ESP-13 WiFi Shield


You will need to wire up your WiFi Shield in the following configuration to upload sketches to it:

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. Connect a Blue wire between D0 (ESP-13 side) of the Shield, and G (ESP-13 side) of the Shield.
8. Make sure that both of the switches on the ESP-13 WiFi Shield are in the "ON" position.

4 of 25 8/21/20, 4:24 PM
Arduino Basics: ESP-13 WiFi Shield Web Server [Link]

Uploading code to the ESP-13


Prepare the ESP-13 Shield for Code upload

1. Make sure that both of the switches on the ESP-13 WiFi Shield are in the "ON" position.

5 of 25 8/21/20, 4:24 PM
Arduino Basics: ESP-13 WiFi Shield Web Server [Link]

2. Connect the Arduino UNO to the computer via USB


3. You should see a Red LED illuminate on the ESP-13 shield.
4. Press the RESET (RST) BUTTON on the bottom left of the ESP-13 Shield

Uploading Code to the ESP-13


In your Arduino IDE - do the following:

1. Create a new file: File > New


2. Copy and paste the "ESP-13 WiFi Shield code" (see below) into the Arduino IDE
3. Make sure ESPDuino(ESP-13 Module) has been selected as the Board in the Tools menu.
4. Select: Tools > Port > COM4 (Your Arduino may be on a different COM port)
5. Select: Sketch > Upload (or Ctrl + U) - or click on right arrow symbol
6. Once code has been uploaded, POWER-OFF the Arduino and remove the Blue wire.
7. Power-up the Arduino and watch the magic happen

ESP-13 WiFi Shield CODE


1 /*==========================================================================
2 * Project: ArduinoBasics WiFi Scanner
3 * Author: Scott C
4 * Date created: 16 September 2018
5 * Arduino IDE version: 1.8.5
6 * Operating System: Windows 10 Pro
7 *
8 * Description:
9 * The ESP-13 WiFi shield will create an Access Point that you can connect to

6 of 25 8/21/20, 4:24 PM
Arduino Basics: ESP-13 WiFi Shield Web Server [Link]

10 * using your phone/tablet/PC. Once connected via WiFi, navigate your browser
11 * to the IP address displayed in the Serial monitor to see the list of Access Points in your area.
12 *
13 * Acknowledgements:
14 * Some of the code used within this sketch was inspired by or adapted from other notable sources.
15 * Webserver code: adapted from [Link]
16 * WiFi scanner code adapted from tablatronix : [Link]
17 * HTTP/1.1 protocols: [Link]
18 *
19 * -------------------------------------------------------------------------
20 * LIBRARIES:
ArduinoBasics_WiFi_Scanner_Code.ino hosted with ❤ by GitHub view raw

Interacting with the ESP-13 Shield


When the ESP-13 WiFi shield regains power, it will create an Access Point called "PinkFluffyUnicorn".
Use the following steps to interact with the shield:

1. Open the Serial Monitor in the Arduino IDE.


2. Press the RESET (RST) Button on the ESP-13 WiFi Shield
3. You should see some instructions inside of the Serial Monitor Window
4. Using your phone, Connect to the WiFi Access Point: PinkFluffyUnicorn
5. Use password: 12345678
6. Open a Browser on your Phone and Navigate to: [Link]
7. You should now see a list of Access Points in your Area (excluding PinkFluffyUnicorn)
8. The list should automatically refresh every 5 seconds
9. You can also see the "GET" requests sent by the browser in the Serial Monitor.

7 of 25 8/21/20, 4:24 PM
Arduino Basics: ESP-13 WiFi Shield Web Server [Link]

8 of 25 8/21/20, 4:24 PM
Arduino Basics: ESP-13 WiFi Shield Web Server [Link]

9 of 25 8/21/20, 4:24 PM
Arduino Basics: ESP-13 WiFi Shield Web Server [Link]

10 of 25 8/21/20, 4:24 PM
Arduino Basics: ESP-13 WiFi Shield Web Server [Link]

11 of 25 8/21/20, 4:24 PM
Arduino Basics: ESP-13 WiFi Shield Web Server [Link]

Using the ESP-13 Shield


Now that we know everything is working. We can now use the Shield as a Shield.

1. POWER-OFF the Arduino UNO


2. Remove ALL of the connection wires between the Arduino and the ESP-13 Shield.
3. Place the ESP-13 WiFi Shield onto the Arduino UNO by lining up the respective header pins
4. The ESP-13 side of the shield lines up with the Power and Analog pins of the Arduino
5. The Arduino side of the Shield lines up with the Digital pins of the Arduino
6. When the shield is installed, the WiFi chip should be on the opposite side from the power jack
7. Double check that ALL of the male headers on the underside of ESP-13 shield are sitting in the
appropriate female header on the Arduino UNO
8. POWER-UP the Arduino UNO, and reconnect to the WiFi Access point as before, and navigate the
browser to [Link] as before.
9. ***PLEASE NOTE: You will no longer see any further communication in the Serial Monitor window.
If you want to use the serial monitor, then you will have to take the shield off and connect the
wires again (but not the blue one).
10. The blue wire is only needed when you UPLOAD CODE to the ESP-13 Shield.

You can now disconnect it from the computer completely and power your project with an appropriate
battery. You can take this project around your house and find the WiFi blind-spots in your home.

12 of 25 8/21/20, 4:24 PM
Arduino Basics: ESP-13 WiFi Shield Web Server [Link]

13 of 25 8/21/20, 4:24 PM
Arduino Basics: ESP-13 WiFi Shield Web Server [Link]

Summary
In this tutorial I showed how to upload a sketch to the ESP-13 WiFi shield. The code set the ESP-13
WiFi shield as an Access Point, and created a web server. The Webpage created was a bit primitive,
but I did not want to get overly complicated at this stage. I hope to provide another tutorial in future
which will show you how to create a more interesting yet more complicated web page using AJAX
requests and XML. I plan to serve a webpage stored on the ESP-13's flash chip.

Please let me know if this tutorial helped you in any way.


Until next time.....

Social Media
You can find me on various social networks:

14 of 25 8/21/20, 4:24 PM
Arduino Basics: ESP-13 WiFi Shield Web Server [Link]

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.

Posted by ArduinoBasics at 9/17/2018 01:13:00 am


Labels: Access Point, Arduino UNO, ESP-13, KEYES, Scanner, Shield, tutorial, Web Server, WiFi

27 comments:

Kratos 14 December 2018 at 01:00


Thank you mister. You helped me a lot...
Reply

Replies

ArduinoBasics 14 December 2018 at 09:32


Thanks for the feedback Kratos.

15 of 25 8/21/20, 4:24 PM
Arduino Basics: ESP-13 WiFi Shield Web Server [Link]

Reply

Anonymous 20 December 2018 at 16:46


How do you make it so you just have a blank web server and it no longer searches for the signal
strength of nearby wifi Ports
Reply

Replies

ArduinoBasics 21 December 2018 at 22:07


You would modify the code within the constructHTMLpage() section.

Reply

Anonymous 10 January 2019 at 00:50


I tried to do what the instruction said, but when I upload the code from arduino IDE, this error
message appears:
warning: espcomm_sync failed
error: espcomm_open failed
error: espcomm_upload_mem failed
error: espcomm_upload_mem failed

What possible methods can I do?


Reply

16 of 25 8/21/20, 4:24 PM
Arduino Basics: ESP-13 WiFi Shield Web Server [Link]

Replies

ArduinoBasics 13 January 2019 at 22:24


What part of your setup is different from mine ?
What Arduino are you using? What wifi-shield are you using? Where did you get it?
Perhaps ask in the Arduino forums. They would have more experience than me with
this.
I can only show you what I did, and so I can only conclude that you are doing
something different, or have different hardware.

ArduinoBasics 13 January 2019 at 22:48


Make sure to follow all instructions provided above (in the same order).
You may need to cycle the power, or press reset on the Arduino.
You may need to press the Reset button on the shield again.
If that fails, then maybe hold the "Reset and Key" buttons down at the same time for
about 5 seconds.
Double check ALL connections, and switches.

Unknown 20 January 2019 at 20:56


I´ve got the same problem.

hornet 14 March 2019 at 07:36


Hi,

Double check if you have blue wire connected

17 of 25 8/21/20, 4:24 PM
Arduino Basics: ESP-13 WiFi Shield Web Server [Link]

Unknown 2 February 2020 at 14:39


Reset both boards solved my same problem.

Thanks

Reply

Unknown 16 January 2019 at 22:45


can I get ESP13 Fritzing file?
Reply

Replies

ArduinoBasics 22 January 2019 at 07:40


It took me ages to create.
I am not just going to give it away.
You can have it for $500

Reply

Unknown 20 January 2019 at 20:53


Hello, i´ve got the problem, that there is a error message in the arduino ide:

"warning: espcomm_sync failed

18 of 25 8/21/20, 4:24 PM
Arduino Basics: ESP-13 WiFi Shield Web Server [Link]

error: espcomm_open failed


error: espcomm_upload_mem failed
error: espcomm_upload_mem failed"

I´ve done everythinJonasg like the tutorial.

I hope that you can help me,

Reply

Replies

ArduinoBasics 22 January 2019 at 07:23


Prepare the ESP-13 Shield for Code upload:
Make sure that both of the switches on the ESP-13 WiFi Shield are in the "ON" position.
Make sure that you have the blue wire connected as per the fritzing sketch.
Connect the Arduino UNO to the computer via USB
You should see a Red LED illuminate on the ESP-13 shield.
Press the RESET (RST) BUTTON on the bottom left of the ESP-13 Shield

Uploading Code to the ESP-13:


In your Arduino IDE - do the following:
Create a new file: File > New
Copy and paste the "ESP-13 WiFi Shield code" into the Arduino IDE
Make sure ESPDuino(ESP-13 Module) has been selected as the Board in the Tools menu.
Select: Tools > Port > COM4 (Your Arduino may be on a different COM port)
Select: Sketch > Upload (or Ctrl + U) - or click on right arrow symbol
Once code has been uploaded, POWER-OFF the Arduino and remove the Blue wire.

19 of 25 8/21/20, 4:24 PM
Arduino Basics: ESP-13 WiFi Shield Web Server [Link]

ArduinoBasics 22 January 2019 at 07:24


Also please note that you may need to select a different COM port.

ArduinoBasics 22 January 2019 at 07:28


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

You may want to reduce the "upload speed", if you are still having issues.

ArduinoBasics 22 January 2019 at 07:33


This link may also help:
[Link]

20 of 25 8/21/20, 4:24 PM
Arduino Basics: ESP-13 WiFi Shield Web Server [Link]

Reply

Unknown 22 January 2019 at 01:22


Could you upload the sketch, whitch is in the libary?

I think that in the sketch that is up there a mistake.

I hope that you can do this, because i need it to the 1th February.

Jonas
Reply

Replies

ArduinoBasics 22 January 2019 at 07:16


I am not sure what you are asking me to do?
Are you suggesting that there is a mistake in the code that I have written, or that there
is a mistake in the library? I am not sure what you want me to do?

Reply

Clemens 27 January 2020 at 07:30


Great tutorial! Everything works except when I try to upload when the esp13 is plugged in as
shield.
Upload only works if it's connected through jumpers. Any hints??.. :(

21 of 25 8/21/20, 4:24 PM
Arduino Basics: ESP-13 WiFi Shield Web Server [Link]

Another question: If I want to use the passthrough digital pins on the shield, do I control them
via the Arduino or using the shield? I.e. upload that code to the shield or Arduino?
Reply

Replies

Clemens 9 March 2020 at 23:14


Do I not deserve a reply? :)

ArduinoBasics 10 March 2020 at 07:35


Replies are optional - not mandatory.
But the instructions above strictly specify that you need to upload when connected via
jumper wires, and NOT in the shield position.

Reply

oky 9 March 2020 at 19:15


Hello, i´ve got the problem, that there is a error message in the arduino ide:

"File "C:\Users\Ahmad Sidqi B\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266


\2.6.3/tools/[Link]", line 65, in
[Link](cmdline)
File "C:/Users/Ahmad Sidqi B/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266
/2.6.3/tools/esptool\[Link]", line 2890, in main
[Link]([Link])

22 of 25 8/21/20, 4:24 PM
Arduino Basics: ESP-13 WiFi Shield Web Server [Link]

File "C:/Users/Ahmad Sidqi B/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266


/2.6.3/tools/esptool\[Link]", line 483, in connect
raise FatalError('Failed to connect to %s: %s' % (self.CHIP_NAME, last_error))
[Link]: Failed to connect to ESP8266: Invalid head of packet (0x18)
[Link]: Failed to connect to ESP8266: Invalid head of packet (0x18)
"
i hope you can help me please
Reply

Replies

ArduinoBasics 9 March 2020 at 22:50


no idea - but I did notice you have folder separations that look like "/" and others that
look like "\" within the same string?? That does not look correct.

Neuron Upheaval 23 June 2020 at 08:34


I was having the exact same issue with the most recent esp8266 board library.

The solution was to first upload the BareMinimum sketch into the Arduino Uno board
alone.

Reply

Neuron Upheaval 24 June 2020 at 07:15


I also downgraded the esp8266 board library to version 2.5.0.

23 of 25 8/21/20, 4:24 PM
Arduino Basics: ESP-13 WiFi Shield Web Server [Link]

Reply

bk 6 August 2020 at 03:36


If my question gets added by the moderator, please ignore. I downgraded to the 2.5.0 as Neuron
Upheaval did and everything worked!!
Thanks so much for all the hard work you did.
Reply

Enter your comment...

Comment as: Google Account

Publish Preview

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.

Newer Post Home Older Post

Subscribe to: Post Comments (Atom)

24 of 25 8/21/20, 4:24 PM
Arduino Basics: ESP-13 WiFi Shield Web Server [Link]

Sponsors

This Week's Most Popular Posts Get Email Notifications of My Latest Posts

Email address... Submit


sprintf function

433 MHz RF module with Arduino Tutorial 1 Subscribe To ArduinoBasics

CH376S USB Read/Write module Posts

Simple Arduino Serial Communication Comments

433 MHz RF module with Arduino Tutorial 4:

Awesome Inc. theme. Powered by Blogger.

normal

25 of 25 8/21/20, 4:24 PM

You might also like