How to Add WiFi Control to Any Project || ESP32 Beginner's Guide

36K7019

Intro: How to Add WiFi Control to Any Project || ESP32 Beginner's Guide

In this project I will show you how easy/difficult it is to use an ESP32 with the Arduino IDE in order to add WiFi control to any electronics project. Along the way I will show you how to use the ESP32 to create a simple WiFi server and how to create a fitting control app for your smartphone. Let's get started!

STEP 1: Watch the Video!


The video gives you all information you need to add WiFi control to any of your electronics projects. In the next steps though, I will present you some additional information.

STEP 2: Order Your ESP32!

Here you can find suppliers for the ESP32: (Mine is from the Ebay link, affiliate links)

Aliexpress: https://s.click.aliexpress.com/e/_dXcHSHv

Amazon.de: http://amzn.to/2fGZBEw

Ebay: http://rover.ebay.com/rover/1/711-53200-19255-0/1?...

STEP 3: Upload the Code!

Here you can find the code/sketch that I created during the video. Feel free to download it and use it for your own projects.

Here are also useful reference sites for the ESP32 that I also partly used in the video:

http://esp32.net/

https://github.com/espressif/arduino-esp32

https://github.com/MartyMacGyver/ESP32-Digital-RGB...

STEP 4: Install the App!

Here you can download the App that I created during the video for Android phones. But you can also easily create your own App with the MIT App Inventor: http://appinventor.mit.edu/explore/

STEP 5: Success!

You did it! You just added a WiFi control to your electronics project!
Feel free to check out my YouTube channel for more awesome projects:

http://www.youtube.com/user/greatscottlab

You can also follow me on Facebook, Twitter and Google+ for news about upcoming projects and behind the scenes information:

https://twitter.com/GreatScottLab

https://www.facebook.com/greatscottlab

12 Comments

What was the tool you were using to plug in code functions. I missed where and what the was. It looked very cool. was that from MIT? Cost Money? Did it really work for you? We want to add functions but are weak in C coding experience. At 72 years old we can spend so much time learning to code again. We have Trains to build. Dennis
ik can't download the code what can i do?
I always end up with "server was not declared in this scope"
You need to declare server by adding at the top of the scetch: WiFiServer server(80);
Do you have:
WiFiServer server(80);
at the top of your code, just under the include statements?
Many thanks for posting the commands to easily detect and trigger on various URL content!

In my case, I was setting up WiFI to trigger sending of IR codes using IRremote. I found it was necessary to "close out" the client session, otherwise, the IR code was sent multiple times. When setting pin states, this artifact probably isn't noticed because the pin is being set to the same value (multiple times).

After the readStringUntil, I added:

client.println("HTTP/1.1 200 OK");
client.println("Content-type:text/html");
client.println();
client.println();
client.flush();
client.stop();
delay(500);

This closed off the session, which prevented the if(client) loop from being re-run on the same request. It's not clear why I needed a delay at the end, but if it wasn't there, the process seemed to hang after the first test of the URL.

Can somebody please help me with my problem

"
Mehrere Bibliotheken wurden für "WiFi.h" gefunden
Benutzt: C:\Users\IDK\Documents\Arduino\hardware\espressif\esp32\libraries\WiFi
Nicht benutzt: C:\Users\IDK\Documents\Arduino\libraries\WiFiNINA
Nicht benutzt: C:\Users\IDKl\Documents\Arduino\libraries\WiFi
Nicht benutzt: C:\Program Files (x86)\Arduino\libraries\WiFi
exit status 1
'server' was not declared in this scope
"

can you make the data pin from the esp32/esp8266 any pin you want and could i have the 32x32 led matrix hooked up to a arduino pro mini to power the led matrix and have the esp8266 send images from my phone to the led matrix?

Excellent work-thanks for the guide!

Thank You for this video! I've loved it (as most of yours :-) )!

I'm planning to make a room thermostat (heating controller) with it. It should measure the floor temp, the ceiling temperature, the room humidity and room temperature. Room temperature should be set on it via buttons or touch sensor.

The question for me is that can it handle one digital temperature sensor, one digital temperature and humidity sensor, the buttons, oled screen and a relay at the same time? I want to use it standalone, without Nano, if possible. Relay is not sure, if the job can't done without a central unit. In that case thermostat must be able to ask for heating and for (ceiling) cooling at a central unit, so must be able to communicate with it on wire. Wireless is used to monitoring and setting temperature.

Thank You!

Can you include the video link since the Android Instructable ap doesn't show videos otherwise?