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

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

About: Awesome Electronics Tutorials, Projects and How To´s

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

Be the First to Share

    Recommendations

    • Make it Glow Contest

      Make it Glow Contest
    • First Time Author Contest

      First Time Author Contest
    • PCB Challenge

      PCB Challenge

    11 Discussions

    0
    hawwin
    hawwin

    Question 24 days ago on Step 3

    ik can't download the code what can i do?

    0
    CommanderRedYT
    CommanderRedYT

    Question 1 year ago

    I always end up with "server was not declared in this scope"

    0
    tjalling
    tjalling

    Answer 12 months ago

    You need to declare server by adding at the top of the scetch: WiFiServer server(80);

    0
    johngo7470
    johngo7470

    Answer 1 year ago

    Do you have:
    WiFiServer server(80);
    at the top of your code, just under the include statements?

    0
    johngo7470
    johngo7470

    1 year ago

    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.

    0
    PaulN171
    PaulN171

    Question 2 years ago on Introduction

    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
    "

    0
    TaranA3
    TaranA3

    Question 2 years ago

    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?

    0
    maxhirez
    maxhirez

    3 years ago

    Excellent work-thanks for the guide!

    0
    KödmönZ
    KödmönZ

    3 years ago

    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!

    0
    TheThinker
    TheThinker

    3 years ago

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

    0
    Aleksandar Tsvetkov
    Aleksandar Tsvetkov

    Reply 3 years ago

    https://www.youtube.com/watch?v=ZAqNKaX3LQ0