ESP32 Localhost Two-Way Communication - Tutorial for Absolute Beginners Step by Step
Ahmad Logs Ahmad Logs
19.4K subscribers
15,707 views
425

 Published On Jul 11, 2023

In this video, we explore the exciting world of ESP32 and localhost two-way communication. Starting with an introduction to websockets, we dive into the working principles behind websockets and the PHP Ratchet library. We guide you through the setup process, from installing Composer to creating the project folder and installing the necessary Ratchet library.

Next, we demonstrate how to create a websocket server and define its address, followed by starting the server and testing it using a websocket client extension. We also write additional code for the server and conduct tests from a mobile phone to ensure seamless communication.

With the foundation in place, we switch gears and build a custom websocket client using JavaScript. Additionally, we design a home page for our project, complete with a toggle button and temperature data handling. You'll learn how to display button states and temperature information on the home page.

The video then delves into creating a websocket client on the ESP32, showcasing how to test its functionality and send fake data from the ESP32 to localhost. We demonstrate sending real-time DHT11 sensor data to the localhost server and explore controlling an ESP32 LED from the localhost server. Finally, we demonstrate how to control the ESP32 LED using a push button.

--------------------------------------------------------------------------------------------------------------------
Useful Video Links
--------------------------------------------------------------------------------------------------------------------
ESP32 Send Temperature and Humidity Data to localhost XAMPP
   • ESP32 Send Temperature and Humidity D...  

--------------------------------------------------------------------------------------------------------------------
Download Code
--------------------------------------------------------------------------------------------------------------------
https://github.com/ahmadlogs/esp-loca...

For Paid Projects Hire Me On Upwork:
https://www.upwork.com/freelancers/~0...

--------------------------------------------------------------------------------------------------------------------
Disclaimer
--------------------------------------------------------------------------------------------------------------------
Disclaimer: All videos are for educational purposes and use them wisely. Any video may have a slight mistake, please take decisions based on your research. This video is not forcing anything on you.

#ESP32 #Localhost #esp32project



00:00 - Introduction
00:17 - Previous Knowledge
00:37 - Contents Overview
01:51 - WebSocket Introduction
02:40 - How WebSocket Works
03:17 - PHP Ratchet Library
03:53 - Installing Composer
05:13 - Setting up the Project Folder
06:52 - Installing Ratchet Library
07:45 - Creating WebSocket Server
11:12 - Defining WebSocket Address
13:16 - Starting WebSocket Server
13:43 - Installing WebSocket Client Extension
14:18 - Testing WebSocket Server using Client
15:32 - Writing Additional Code for WebSocket Server
17:07 - Testing WebSocket Server From Phone
17:55 - Updating WebSocket Server IP Address
18:27 - Final WebSocket Test
19:08 - Implementing Message Sending on Server
21:58 - Building Custom WebSocket Client Using JavaScript
25:11 - Creating Home Page for the Project
26:52 - Implementing Toggle Button on Home Page
31:35 - Handling Temperature Data on Home Page
34:04 - Displaying Button and Temperature Info on Home Page
35:18 - Creating WebSocket Client on ESP32
40:13 - Testing ESP32 WebSocket Client
40:57 - Sending Fake Data from ESP32 to Localhost
42:20 - Sending DHT11 Data to Localhost
44:40 - Controlling ESP32 LED from Localhost
46:28 - Controlling ESP32 LED Using Push Button
47:25 - Final Demo
47:57 - End Screen

show more

Share/Embed