Smartphone controlled WiFi car | esp32 | Mecanum wheels

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hello and welcome to hash include electronics in this video we are going to make wi-fi card using esp32 microcontroller and programmed using arduino ide we will use mechanim wheels so that car can be moved in any direction car will be controlled using our mobile phone so keep watching and i will explain you in details how to make it if you haven't subscribed yet please hit subscribe button below and press bell icon to get latest updates for making wi-fi car we will need 4 tt gear motors 4 mechanum wheels there are l-type and r-type mechanism wheels so we will need 2 of each wooden plate for car chases esp32 module l298 and motor driver module we will need two pieces breadboard 7 to 12 volt battery in our case lipo 3s battery switch double sided tape glue gun and few jumper wires let's assemble the car now first let's solder wires to gear motors mount all four motors on car chassis using glue gun attach l298 and motor driver modules on car chassis using double sided tape [Music] mount breadboard on car chassis [Music] fix esp32 module on breadboard attach switch for turning on and off car [Music] this is what the car looks like from the top view as shown we have 4 motors as front right back right front left and back left motors we will control two right side motors using right side l298 motor driver module and two left side motors with left side motor driver module now let's make a connection as for circuit diagram connect gear motors to l298 motor driver module right side motors will be connected to right side motor driver module and left side motors will be connected to left side motor driver module solder dc battery connector to switch and connect to motor driver modules plus 12v pin and ground connect l298 motor driver modules to esp32 pins we will take plus 5 volt from right side l298 and motor driver module and provide to esp32 v in pin attach wheels to car now [Music] place the battery using double sided tape let's take a quick look at the code first we need to install esp32 board using arduino board manager i have provided the esp32 board link in the description below go to preferences and add the esp32 board link then go to boards manager and search for esp32 and install it after that we need to install the async tcp library as well i have provided the link in the description below for more information on esp32 please check my video where i have explained in details about it now we need to include the async tcp library and async web server library as well this code can work for both esp32 as well as esp8266 then we have defined the values for car movement after that we defined the four motor numbers define forward and backward movement constants we have created a structure to store in one and into pins for each motor control then we have created a vector which is array called as motor pins to store the pins for all four motors you can change the pins if you want to use other pins we have defined the ssid and password for our esp32 wifi we have created web server at port number 80. we will be using websocket for communication over wi-fi then we have created html page for our car control app and stored it in html home page variable this is main page which will be displayed on mobile and it has all buttons to control the car when any control is pressed on mobile it will send particular number to sp32 using websocket we have created rotate motor function which takes motor number and direction as arguments it will rotate motor in forward or backward direction it will also stop motor if stop command is passed then we have process car movement function which takes command for car movement as argument it will move the car based on commands like up down left right etc we have handle root function which will send html page when we type ip address on mobile browser we have on web socket event callback function which will be called when esp32 receives any data from mobile on receiving ws even data we will call process car movement function to move the car accordingly we have created setup pin mode functions to setup motor pins as output inside setup function we will call setup pin mode function then begin wi-fi using soft ap mode set up callback function on root and on not found then attach the websocket handler to web server now begin the wi-fi server inside loop function we just need to call cleanup clients function to clean up old client's connection i have provided the link to the code in the description below you can upload it directly now let's upload the code select board as esp32 rover module and hit upload now switch on the car [Music] go to wifi settings and connect to my wifi car ssid using password as 1 2 3 4 5 6 7 8. open google chrome browser on mobile and type 192.168.4.1 it will open our wifi car control app that's it let's see how it works now [Music] [Music] it is nice but can it fly hope you enjoyed the video and thanks for watching stay safe and please like share and subscribe to my channel [Music]
Info
Channel: hash include electronics
Views: 94,287
Rating: undefined out of 5
Keywords: wificar, mecanumwheels, esp32, smartcar, arduinoprojects, hashincludeelectronics, arduino, nodemcu
Id: l7Ty6SZdKPI
Channel Id: undefined
Length: 7min 38sec (458 seconds)
Published: Sun May 30 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.