Тёмный

ESP32 Localhost Two-Way Communication - Tutorial for Absolute Beginners Step by Step 

Ahmad Logs
Подписаться 18 тыс.
Просмотров 13 тыс.
50% 1

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...
--------------------------------------------------------------------------------------------------------------------
Download Code
--------------------------------------------------------------------------------------------------------------------
github.com/ahmadlogs/esp-loca...
For Paid Projects Hire Me On Upwork:
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

Опубликовано:

 

28 июн 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 49   
@CarlosAndres7
@CarlosAndres7 9 месяцев назад
Thank you! Very useful and complete!!!
@hasanthakarunachandra3722
@hasanthakarunachandra3722 8 месяцев назад
Thank you for making this excellent video.
@hothikirit6629
@hothikirit6629 9 месяцев назад
Awesome explained !!!
@michaelcuento
@michaelcuento 11 месяцев назад
Thanks, Ahmad. I've gained valuable new insights once again from your tutorial..
@AhmadLogs
@AhmadLogs 11 месяцев назад
Glad to hear that!
@CiroPeixoto
@CiroPeixoto 5 месяцев назад
Caraca !!! 😳😳😳Super Video!!! 👏👏👏Parabéns pelo conhecimento e obrigado por compartilhar conosco 🙏
@alfonso2ff
@alfonso2ff 11 месяцев назад
The best, most interesting and complex project presented by you with a didactic score of 10. Congratulations and thank you for sharing your knowledge.
@AhmadLogs
@AhmadLogs 11 месяцев назад
Thank you very much!
@fundemo
@fundemo Месяц назад
Thank you so much ❤, Ahmed bhai apka ye method mere liye bohat hi helpful rha hy.
@alfonso2ff
@alfonso2ff 11 месяцев назад
I carried out the entire step by step of your tutorial and was able to fully reproduce the prototype by measuring temperature, humidity and controlling the LED on the board. The tutorial is very educational and multi code. I really liked! Thanks and Congratulations!
@AhmadLogs
@AhmadLogs 11 месяцев назад
Excellent!
@amrzakaria5290
@amrzakaria5290 11 месяцев назад
Thanks a lot, good job.
@AhmadLogs
@AhmadLogs 11 месяцев назад
Glad it helped
@edinetgrunhed6000
@edinetgrunhed6000 2 месяца назад
very good, i like a PHP so stable
@amysoftec8205
@amysoftec8205 22 дня назад
Thank you so much🥰🥰
@johannbabl5839
@johannbabl5839 10 месяцев назад
Excellemt video, excellent informations and excellent explained. Congrats
@AhmadLogs
@AhmadLogs 10 месяцев назад
thanks
@funnycats9738
@funnycats9738 11 месяцев назад
Thanks again
@AhmadLogs
@AhmadLogs 11 месяцев назад
Always welcome
@parvazno
@parvazno 11 месяцев назад
perfect .thanks
@AhmadLogs
@AhmadLogs 11 месяцев назад
You're welcome!
@davidoleas5084
@davidoleas5084 7 месяцев назад
Excellent video. I have a question. In order to connect another device to the WebSocket server, I had to disable the firewall. Do you know what firewall configurations I need to allow communication without having to disable the entire firewall?
@valerienihsimsion1870
@valerienihsimsion1870 2 месяца назад
I like the explanation, thank you. Can you make the communication to run on any network? Not only on same network
@TechnicalYarana
@TechnicalYarana 11 месяцев назад
bro i have some issue try to same to another device websocket run my websocket not connected actually same device almost working when i try to ip address using connect websocket android app not connected whats issue please sir tell me ??
@AhmadLogs
@AhmadLogs 11 месяцев назад
just restart your computer wifi, restart your mobile wifi then try to connect again.
@TechnicalYarana
@TechnicalYarana 11 месяцев назад
@@AhmadLogs okay sit I will try
@thegamerzzz548
@thegamerzzz548 2 месяца назад
bro can we do this task by directly sending and receiving data from node mcu to sql server without any php in between ?
@prodyumnapal5430
@prodyumnapal5430 4 месяца назад
Can the ESP work the same way if kept anywhere, not in physical contact with the serving host? Like, can this be controlled from anywhere in the world?
@George_NM
@George_NM 9 месяцев назад
So,do we want to clear the clients from client array when clients disconnect
@sanketkharade5672
@sanketkharade5672 3 месяца назад
Hey i havd done exactly the same code for esp32 but my client is not connected to server although wifi gets connected successfully plz help
@MrPool-yu6op
@MrPool-yu6op 5 месяцев назад
@AhmadLogs Is any option to create communication between php server and android code? If yes please help out.
@pradeep6792
@pradeep6792 2 месяца назад
Can we use node mcu instead of esp32 ?
@johanjeques
@johanjeques 10 месяцев назад
Excellent tutorial, your video really inspires me sir. Can we host the WebSocket server to online web hosting and still make two-way communication with esp32?
@AhmadLogs
@AhmadLogs 10 месяцев назад
yes you can host websocket server online on a cloud or webhosting
@johanjeques
@johanjeques 10 месяцев назад
Thank you sir
@prodyumnapal5430
@prodyumnapal5430 4 месяца назад
Did you do it? can we connect via Linkedin?
@johanjeques
@johanjeques 4 месяца назад
Yes, I already tried. Logically we can host websocket server online to webhosting with this tutorial, but the problem is not all webhosting can host websocket server
@natya609
@natya609 6 месяцев назад
hello friend, how to deploy this program to cloud? will you give the tutorial? thankyou
@govardhanmuddapati8834
@govardhanmuddapati8834 7 месяцев назад
Make a video an esp32 without entering wifi credentials on programming we can customize the wifi credentials without touching the program
@raihanzaenalmutakin9144
@raihanzaenalmutakin9144 8 месяцев назад
why my vendor file doesnt has the autoload.php
@dilangunawardhana
@dilangunawardhana 11 месяцев назад
Ahmad, Instead of doing this with web socket server can we do the same project (real time & two way communication) with MySQL server....?
@AhmadLogs
@AhmadLogs 10 месяцев назад
I am not sure if it is possible directly. you need to refresh the database table to see the new values.
@rogeranthonybairoy8854
@rogeranthonybairoy8854 10 месяцев назад
may i ask what version of the Arduino Socket are you using?
@AhmadLogs
@AhmadLogs 10 месяцев назад
0.5.3
@rogeranthonybairoy8854
@rogeranthonybairoy8854 10 месяцев назад
i followed the video but when i try to compile it into an esp32, it sat that variable or field 'handleMesage' declared void, how should i fix this?
@AhmadLogs
@AhmadLogs 10 месяцев назад
install the esp32 2.0.9 core
@khanhdaoba
@khanhdaoba 11 месяцев назад
Nice video, can i have your Facebook information ?
@mirkocapon
@mirkocapon 3 месяца назад
how i can contact you? do you have an email? thanks
Далее
How Web Sockets work | Deep Dive
10:22
Просмотров 6 тыс.
ESP32 Web page creating and updating
32:11
Просмотров 143 тыс.
ESP32-CAM Video over Websockets
12:34
Просмотров 10 тыс.
Getting Started with ESP32 - Step-By-Step Tutorial
19:50
How To Read Bin File From ESP32 and ESP8266
10:22
Просмотров 30 тыс.
ESP32 WebSocket Server
10:25
Просмотров 53 тыс.
How to Expose Local Host using Cloudflare Tunnels?
24:34