Introduction to ESP32 - Getting Started

  Переглядів 662,710

DroneBot Workshop

Рік тому

Today we will get started with the ESP32, a low-cost and extremely versatile microcontroller with integrated WiFi and Bluetooth. I’ll show you how to set up your Arduino IDE for the ESP32 and then we’ll try out several example sketches.

Full Article with code: dbot.ws/esp32
More articles and tutorials: dronebotworkshop.com
Join the conversation on the forum: forum.dronebotworkshop.com
Subscribe to the newsletter and stay in touch: dbot.ws/dbnews

I apologize for the delay in getting another video out for you, the current situation has greatly impacted me as I’m sure it has you. Please stay safe and isolate!

After many requests, I am finally bringing the ESP32 into the workshop, and it’s here to stay - I’ll be doing a lot of ESP32 projects going forward. And when you see all of the features that this incredible microcontroller has I’m sure you see why!

The ESP32 is a microcontroller from Espressif Systems that has a wealth of features, including multiple I/O ports, analog inputs AND outputs, WiFi, Bluetooth and BLE, touch switches, timers, and real-time clocks, and much more.

This inexpensive processor is available on a number of modules, some of which include displays, microSD card sockets or even cameras.

Today we will get started using the ESP32. And the first thing we will do is set up our Arduino IDE to add the ESP32 boards to it.

After we get our programming environment ready we'll write the obligatory “hello world” program, which for microcontrollers is the good old Blink sketch. You’ll see how uploading code to the ESP32 differs from the Arduino AVR boards we are used to using.

After that, we will go through some of the many example sketches that get installed with the ESP32 board manager, including examples for WiFi and Bluetooth.

It’s a long video (like always LOL) so here’s a breakdown if you want to skip directly to a specific section:

0:00 - Intro
1:56 - ESP32 Introduction
6:11 - ESP32 Boards
10:24 - Setting up the Arduino IDE
12:33 - ESP32 Hookup
14:10 - ESP32 Blink Sketch
19:04 - WiFi Introduction
21:05 - WiFi Scanner
24:23 - WiFi Access Point
26:51 - WiFi Simple Server
30:09 - Bluetooth Introduction
31:20 - Serial to Serial Bluetooth
34:37 - Simple Time
39:17 - Hall Sensor
40:48 - LED Software Fade
42:27 - Repeat Timer
43:40 - Touch Read

You can use just about any ESP32 board with these experiments, and the only other components you’ll need are an LED (with dropping resistor), a push-button switch and something metal to use as a touch sensor.

Incidentally, this video subject was suggested to me as the result of a poll on the DroneBot Workshop Forums. If you want to have a say in the content for future videos and articles the forum is the place to go! Just visit forum.dronebotworkshop.com and join in the conversation!

This is just the first of many ESP32-related videos, so be sure to subscribe for more!

I hope you enjoy the video and please stay inside and stay safe!

Bill

КОМЕНТАРІ
Narisara Phianphang
Narisara Phianphang 2 дні тому
Can I have a clip of esp32 to control the motor please
Kean4711 DUB
Kean4711 DUB 5 днів тому
Can it be used as a HID with joystick overriding serial?
Besho Spidey
Besho Spidey 5 днів тому
Sir, you are an excellent instructor and your channel is the best because you have the knowledge and capability to make everything is simple and easy. Thank you keep going
One of Numbers
One of Numbers 8 днів тому
You are, WITHOUT A DOUBT, one of the best instructors on youtube!
Moss Fett Labs
Moss Fett Labs 9 днів тому
Video is burry
JMUSpinDoctor
JMUSpinDoctor 10 днів тому
Love the video! Can't seem to get the links to work, however (ERR_CONNECTION_CLOSED). Any help would be appreciated!
SMART ASSIST
SMART ASSIST 15 днів тому
Dear kind Sir, I requested “registering” to your forum. In addition, I gave true reason why I need to learn quickly . Most humble appreciation - Alton
Sam Soper — Mural Art & Illustration
Sam Soper — Mural Art & Illustration 15 днів тому
Thank you so much for this video. So freaking helpful. Building some Wifi controlled light up hanging cloud props for a clients house and this made everything so understandable.
Ray Leiter
Ray Leiter 16 днів тому
This guy is quite possibly the best presenter on the entire internet! It is very rare to find someone who speaks well in terms of volume and cadence, and of course, clarity.
Jacob Wallis
Jacob Wallis 17 днів тому
Love your videos!!
frutt56
frutt56 20 днів тому
I'll give him 10 minutes to see what it's about... At the end I watched it twice full length.
frutt56
frutt56 20 днів тому
Bye bye Raspi, I'm into these devices.
Alvaro Aguilar
Alvaro Aguilar 28 днів тому
Thanks from Costa Rica. Excelent expositions
Bizz King
Bizz King Місяць тому
You are the greatest Sir!!!!
Nils Sappok
Nils Sappok Місяць тому
What an excellent tutorial! I wish at least one of my teachers had structured and presented the content as well! I could be really smart by now.....
Kiran MVV
Kiran MVV Місяць тому
16:52 For me, pressing the EN button resulted in MORE trash... :( what needs to be done here?
irgski
irgski Місяць тому
Can you do an update with the ESP32-C3? Esp blinking the onboard rgb led. I’m trying to do it via VS Code but cannot get it to work. Thanks
venkat Magudeshwaran
venkat Magudeshwaran Місяць тому
25:52 , while changing ip address, it says error "more decimal number". can you help, how to clear and give different ip address ?
VARUN DESAI
VARUN DESAI Місяць тому
I followed all the steps but I am getting a garbage value at the serial monitor screen. Please help me with this.
David Dirac
David Dirac Місяць тому
In Tools - > Board Manager -> esp32. Do not choose version above 1.0.4. The arduino sketch will load into esp32 board for version 1.0.4 only.
Achraf Aqdim
Achraf Aqdim Місяць тому
لو عايز تخترق أى شبكة WIFI وتفتح منها نت بكل سهولة - الطريقة اهى ببلاش - اولا هتفتح متصفح جوجل واكتب فى البحث mbc70 ادخل اول موقع يظهرلك فى البحث هتحط اسم الشبكة هيظهرلك الباسورد
Claude Dufourmont
Claude Dufourmont Місяць тому
Very interesting subject, very well presented. I keep in mind the little tips for my next videos focused mainly on the ATtiny 85 (and 84), I will start the ESP32 soon.
JarppaGuru
JarppaGuru Місяць тому
17:42 what? arduino use python background? why is not instal them when install board opsy
JarppaGuru
JarppaGuru Місяць тому
0:57 if it arduino compatible and coding happen arduino ide it is arduino for me. same code. platform can be diff. switching to new python/c board that cant be programmed familar IDE no thx
Paul Bearden
Paul Bearden Місяць тому
I've seen that microcontroller before... Yeah, it is called the X1000 from the movie 'Small Soldiers', Hello Mr. Chip!
JP Toutant
JP Toutant 2 місяці тому
at the count of 3 you will obey my worksshop
Martin Mendez
Martin Mendez 2 місяці тому
A little correction for WiFi Access Point. At 24:40, it is mentioned to change the Default IP, but it does not work as said. Use: IPAddress ip(192, 168, 0, 1); IPAddress mask(255, 255, 255, 0); WiFi.softAPConfig(ip, ip, mask); WiFi.softAP(ssid);
VIKKI BINNAR
VIKKI BINNAR 2 місяці тому
Very nice explanation. Sir, Please cover the STM32F072 microcontroller and its STMCubeIDE
Delilah Long
Delilah Long 2 місяці тому
your voice is amazing. You're like the Bob Ross of microcontrollers. Subscribed!
Mariam Mohamed Saad
Mariam Mohamed Saad 2 місяці тому
Can someone please tell me what the bare metal touch switch does?( In the hardware connections)
Mariam Mohamed Saad
Mariam Mohamed Saad 2 місяці тому
Thank you so much...great video
HastyTheGent
HastyTheGent 2 місяці тому
Thank you so much, it helped me a lot
sssedo
sssedo 2 місяці тому
Is there any kind of video like to measure the strength and so, to calculate the distance maybe. Measuring the strenght would be enough. thanks a lot for helping
Asif S
Asif S 2 місяці тому
Is this board from keeyees?
Bogdan Angela
Bogdan Angela 2 місяці тому
Good video. It helped me a lot !! Thank you.
faselblaDer3te
faselblaDer3te 3 місяці тому
Your tutorial videos are worth their bytes in gold! Clear, easy to follow, professional, and thorough.
Himanshu Singh
Himanshu Singh 3 місяці тому
One of the most useful video on youtube for me till now.
Jeffrey Blackham
Jeffrey Blackham 3 місяці тому
So these are used in voting machines.
Rajesh Jaswal
Rajesh Jaswal 3 місяці тому
@ 16:06 - please note that no button was required to be pressed and / or released with my esp32 board. And also, reset button was not required to be pressed either to start the program. Thanks!
Kai-Made
Kai-Made 3 місяці тому
I am absolutely happy that you have done a very thorough break down of the esp32. I am working in iot and recently started working with a variety of esp32 containing MCs and this has been very helpful, and is a great way to digest information while I am actually doing work. I know I could read all the datasheets but I find that I retain information better when someone explains it compared to just reading. Thanks man.
AR Creations
AR Creations 3 місяці тому
I just want to know what is the disadvantages of ESP32 board over Arduino? Some say "NO USB EMULATION". I don't know what is that. Can you explain?
prateek chowdhury
prateek chowdhury 3 місяці тому
My computer not recognising my nodemcu 1.0. On online forums people are saying that it's a driver issue but I cant figure out. Please help if anyone knows the possibility of problem.
tony gillam
tony gillam 3 місяці тому
got a problem with my esp32 board, the usb is not recognised
girlwithapple
girlwithapple 3 місяці тому
Excellent overview! Thank you so much
Oscar CeJa
Oscar CeJa 3 місяці тому
Is this video part of one of your playlist? I didnt see any playlist abou ESP32. This is a great video and should be better to have one playlist with all your ESP32 videos
Paolo Contedini
Paolo Contedini 3 місяці тому
I entered the land of toys. I realize that there are people who use this prodigy for very important things and it fills my heart. You are fantastic and enlightening. I'm learning to understand the language better too. You have a smooth flowing cadence without smudging and it doesn't bore the listener. Again, you are enlightening. A hug with affection.
chuncheng zou
chuncheng zou 3 місяці тому
tks!
Mayank Gupta
Mayank Gupta 3 місяці тому
Why was the touch switch used for the blink sketch, I did not see you use that as an input mean
tony gillam
tony gillam 3 місяці тому
Hi this is a very interesting project, I am a newcomer to all this , I want to ask a question , I have an old electronic organ it uses IC's can you program an esp32 to do some of these functions??
Jake Daurham
Jake Daurham 3 місяці тому
Amazing 🙌🏼
Paul Allen
Paul Allen 3 місяці тому
If there was a problem, DroneBot solves it, Check out the blink while my new sketch revolves it... #ShowingMyAge 😂🤣
千代大河
千代大河 4 місяці тому
日本人でも分かりやすいなり。
atikahdy
atikahdy 4 місяці тому
Hi, I’m from Indonesia. I love your video, Very Clear information and useful for a Beginner like me. Thank you so much. I’m waiting another video Project for esp32 an IoT.
Piotr T
Piotr T 4 місяці тому
I wish I could buy esp with Ethernet in normal price...
Nightfall345
Nightfall345 4 місяці тому
This is exactly what the internet was meant for. Amazing teaching, thank you so much.
Holiday tech and craft
Holiday tech and craft 4 місяці тому
This video is one of best video in UKposts , which is most suitable for beginners in ESP32👏👏👏👌
reece
reece 4 місяці тому
Mate thanks for the in-depth lesson, great stuff
Huseyin Sozen
Huseyin Sozen 4 місяці тому
Hey, buddy. Could you do an ESP8266 video as well? UKposts is filled with nonsense about it and I need a video like your videos to understand better. I really need your help man :( I love your videos btw :) They're amazing, easy to understand and very informative. Thank you for all of them.
Dave Morales
Dave Morales 4 місяці тому
How do these compare to an omega controller?
Nallamilli Veena Madhuri
Nallamilli Veena Madhuri 4 місяці тому
SIR this video helped me a lot,could you kindly do a video on esp-32 using ubidots and thingspeak along with the code
Markus Schlagbauer
Markus Schlagbauer 4 місяці тому
Thank you for this lesson - it helped me a lot to start with ESP 32.
Gabriel Costa
Gabriel Costa 4 місяці тому
This tutorial can be used to apply on the ESP8266 ?
RAIZ 20BRS1164
RAIZ 20BRS1164 4 місяці тому
Is there any simulator for ESP32?
Layton Miller
Layton Miller 4 місяці тому
What a phenomenal overview. I have done an extremely small amount of microcontroller programming and this really got me off to a flying start. Bravo!!!
Ravi Kumar
Ravi Kumar 4 місяці тому
Subscribed. Amazing video. Thank you💕
Toughnut
Toughnut 4 місяці тому
He's like a young Mr. Wizard for electronics! Fantastic!
Sam Raja
Sam Raja 4 місяці тому
You can add a line ion your "setup" to send reset pin high for 200ms and then low, it resets esp32 and no problem with SERIAL monitor.
Sam Raja
Sam Raja 4 місяці тому
If you connect IO0(INPUT/OUPUT PIN ZERO) to ground via resister of about 500Ohms, you do not need to press IO0 button and it starts uploading in with almost no delay.
J Snork
J Snork 4 місяці тому
You are such a good teacher! Thank you for this great tutorial. I am a 67 year old senior. My last programming is about 40 years ago. Now I am looking for solving a water supply (quality) problem in Thailand.I found that the ESP32 with a couple of sensors might help to stop public water going into our tanks as soon as its turbidity exceeds a certain threshold. Actually this idea is just nothing without your help. Thanks. (And thanks for not having an enoying background grove, as this may be horrible for some elderly people...) Best wishes to... USA, I guess? Juergen
Jaso
Jaso 4 місяці тому
even after pressing reset it is showing garbage values in the serial monitor
Volker King
Volker King 5 місяців тому
13:44 Something is wrong inside the LED. Inside the red LED the Anode is on the left side and the Long Anode Pin is on the right side! The small part inside the Red LED is the Anode. Best Regards Volker
23years old
23years old 5 місяців тому
This answer ukposts.info/have/v-deo/jHuTbKGog2-U0XU.html ukposts.info/have/v-deo/i4F2oq2DjqKHr6s.html
Leah C
Leah C 5 місяців тому
This looks so much more useful for my projects with low power and bluetooth etc. Makes the nano a bit obsolete.
James Otis JR
James Otis JR 5 місяців тому
what I tell people: Arduinos are a carburated 1500 cc VW, and the ESP32 is a 5.4L fuel injected V8
Добрый Шубин
Добрый Шубин 5 місяців тому
Мужик, ты лучший! подписался
Flash Gordons
Flash Gordons 5 місяців тому
Good thing I'm subscribed to your knowledgeable channel .......... you deliver just about everything I need ! And the follow up on the web is just perfect. Thanks a million, and keep up the great Videos. I'm probably a couple of years younger than you, but this is like getting back to school, and I just love it ! Goodbye for now :)
Maliek Franklin
Maliek Franklin 5 місяців тому
what do u do when u get an error when trying to upload saying it timeout?
Captain Yak
Captain Yak 5 місяців тому
Excellent explanation of the ESP32 - Thank you!
I'm not Chuck.
I'm not Chuck. 5 місяців тому
@DroneBot Workshop I know I am a year late watching this video, but hopefully not too late to get an answer to a question. In your example of dimming an LED, how and where did you find the ledcSetup and associated functions? Is there a list of other functions that are essential for ESP32 programming, but are new to the Arduino IDE?
T. Stark
T. Stark 5 місяців тому
I didn't hear you mention that when using wifi.h you lose the i/o pins related to ADC2 - GPIO 12-14, 25-27, 34 & 35. Also, my knowledge isn't in depth with this, but while the sketch can compile fine you can have a some type of variable data type mis-match that will cause a memory dump and rest the ESP. Depending on what your program is doing you may, or may not, notice this. When using wifi it drops it momentarily, therefore giving you a spotty connection. With one project, I was doing this caused many headaches trying to figure out what was going on and what was causing it. It almost looks like a brief power drop that is causing the esp to momentarily 'stop' functioning and reset. If you watch the serial monitor you can see when it happens. In one case, it looked liked it was happening randomly, in another case it was happening continuously make the esp useless. In the later case I fixed it but not exactly sure what I did in changing the data types I was using.
Jerry Barnish
Jerry Barnish 5 місяців тому
I am running Linux Ubuntu with the Arduino IDE . The IDE absolutely refuses to add the boards for ESP32. I have tried numerous times. Anyone have an idea? Total nube here. Thanks.
XtianTechno!
XtianTechno! 5 місяців тому
Amazing! all i need about esp32.
Dave Dave
Dave Dave 5 місяців тому
Maybe you shouldn’t already install things if you actually want to create a tutorial. I mean, showing is better than explaining.
Alan Boldock
Alan Boldock 5 місяців тому
This was extremely useful and helped where other videos had not. Thanks for such a well layed out and presented introduction. The text version was excellent also.
HC Electronics
HC Electronics 5 місяців тому
Hello, I'm working with ESP32 and ESP8266 now and are a awesome MCU. Obviously are in development yet but are in a right way. I want ask you is there some tool to program only the esp chip no esp board, just esp chip? I ask this because I need make my own board and I need only the esp chip. So, I was thinking in use the esp board and after desoldering the chip to pass to my own board, but I don't know if this is the best practice. Let me know any idea that you can give me. Thanks so much for your videos and kind regards!
Baylin Bridges
Baylin Bridges 6 місяців тому
Hello Bill, Thank you for everything you do! Great tutorial! You always help me get my projects up and running. -Baylin
alexei gopher
alexei gopher 6 місяців тому
nice! but I waked up when your voice has been stoped ...
Kevin Patel
Kevin Patel 6 місяців тому
This is excellent tutorial and detail info video about ESP32. I highly recommend this video to everyone who's starting with ESP32. Thank you for making this/
Beerke Kjoer
Beerke Kjoer 6 місяців тому
thank you so much for your clear explanation for this beginner. You have a nice calm voice to listen to too.
Paul Wilkie
Paul Wilkie 6 місяців тому
I have been working with a pair of DOIT ESP32 DEV board connected to a pair of LoRa radios. I decided to try a pair of TTGO T7 MINI ESP32 boards. What has happened is that there must be some conflict between the different the USB to UART bridge drivers which renders either boards to fail to communicate even though the Arduino IDE recognizes either boards different drivers (CP210 and CH340) as well as Windows Device Manager. However, I receive a message when trying to download a sketch that says port not able to open?
Actical Marines
Actical Marines 6 місяців тому
Tsé quand tu pence que c'est un américain pi tu "VIDÉOTRON" dans liste de les réseau wifi. :)
kostiaspongo
kostiaspongo 6 місяців тому
Analog inputs are unusables. They are very bad resolution. They have not even 10 effective bits.
Andy Tanguay
Andy Tanguay 6 місяців тому
These things are amazing! Thanks for the great overview.
Vipul Lal
Vipul Lal 6 місяців тому
Love your style and content
Earl Owens
Earl Owens 6 місяців тому
I found an ESP 32 in a drawer in my parts tower. It does not fit standard bread boards. It give me connections on only one side of the ESP32.
Chris Clement
Chris Clement 6 місяців тому
Very informative. I missed this ESP boat and I am catching up.
Martin Poirier
Martin Poirier 6 місяців тому
really nice job, i bought a nodemcu devkit 1 but windows dont reconize it, i had the esp01 working goos so i assume my driver where good, anyway i did try to download all thenm and uninstall one by one and even that, nothing happen, i do have a blinking red/blue and i do see a wifi, witch i can connect but only telling me its a test page, any help ?
Fernando Valdez
Fernando Valdez 6 місяців тому
Awesome explanations and examples, it helped me a lot. Kudos!
Mahmudul Hasan
Mahmudul Hasan 7 місяців тому
It was really a nice tutorial video. Take love for the effort. Each part was helpful.
Chiparooo
Chiparooo 7 місяців тому
So much good stuff in one video! Thank you for sharing!
ESP32 CAM - 10 Dollar Camera for IoT Projects
29:39
DroneBot Workshop
Переглядів 449 тис.
MOSFETs and Transistors with Arduino
40:50
DroneBot Workshop
Переглядів 640 тис.
Макс Корж. Одесса. 24.07.21. (English subs)
5:26
Max Korzh
Переглядів 586 тис.
KiCad STM32 Hardware Design and JLCPCB Assembly
2:31:06
Phil’s Lab
Переглядів 459 тис.
Power For Your Electronics Projects - Voltage Regulators and Converters
37:26
DroneBot Workshop
Переглядів 811 тис.
#371 RISC-V: How much is open source? Featuring the new ESP32-C3
25:25
Andreas Spiess
Переглядів 128 тис.
You can learn Arduino in 15 minutes.
16:34
Afrotechmods
Переглядів 7 млн
Arduino Uno to ATmega328 - Shrinking your Arduino Projects
37:17
DroneBot Workshop
Переглядів 516 тис.
RC Robot Car - RC Controls and Arduino
47:53
DroneBot Workshop
Переглядів 37 тис.
OLED Displays with Arduino - I2C & SPI OLEDs
41:41
DroneBot Workshop
Переглядів 591 тис.
DIY ESP32 AC Power Meter (with Home Assistant/Automation Integration)
10:58
#328 ESP32 Secrets: Interrupts, and Deep-Sleep under the Hood
18:57
Andreas Spiess
Переглядів 121 тис.
Макс Корж. Одесса. 24.07.21. (English subs)
5:26
Max Korzh
Переглядів 586 тис.
Apple Event - September 14
1:18:47
Apple
Переглядів 18 млн
Юнацька Ліга УЄФА. ДИНАМО - БЕНФІКА 4:0. ОГЛЯД МАТЧУ
8:12
ФК «Динамо» Київ
Переглядів 146 тис.