Тёмный
No video :(

How to Create a Web Server (with WebSockets) Using an ESP32 in Arduino 

Shawn Hymel
Подписаться 11 тыс.
Просмотров 144 тыс.
50% 1

This is a continuation of the ESP32 WebSocket Server video: • How to Make an Arduino... . Let's take it to the next level! We begin by hosting a web server and WebSocket server on an ESP32 using Arduino. Next, we use SPIFFS to upload a simple index.html page that we write separately. This page will open a WebSocket connection back to the ESP32, where we can use the page's button to toggle an LED (relatively quickly).
Note that we use the ESP32 as an access point (AP) here to simplify the process. You can do away with the access point, if you wish to have the web server on your local network.
WebSockets provide a persistent connection between a client and server so that either party can send data at any time. They are very useful in things like networked video games, but they can also be applied to IoT devices, if we need fast control of hardware over a network.
Arduino and HTML code from the video can be found here: shawnhymel.com/1882/how-to-cre...

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

 

8 сен 2019

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 180   
@lenreinhart2020
@lenreinhart2020 2 года назад
I just got an ESP32-C3-mini-1 and I had already set up the boards and device to ESP32-C3. Following your presentation, the code worked fine on it. On to the second part! :) Thank you - whoops, this is the second part. I"ll post this back on the first.
@katkothaza
@katkothaza 2 года назад
So I searched google and RU-vid for weeks looking for a detailed yet to the point tutorial about this very topic, and the ones I found are either too complicated or expecting me to be a web developer. Then only today, RU-vid simply suggest this video to me like I never searched for such a thing!! It's exactly what I'm looking for as if it was made specifically for me!! why RU-vid!! why!! 😩 This video should be the top result whenever someone search for "ESP32 webserver" Thank you so much for this video as I find it perfect!
4 года назад
Wow nice timing! Exactly what I need for my next project. ❤️
@barrybuelow9651
@barrybuelow9651 3 года назад
Shawn - Great video! It really helps me out with a project. Hope you are doing well and staying safe.
@peervincent7845
@peervincent7845 4 года назад
Good work Shawn! Done as you had explained and it works perfectly!
@ShawnHymel
@ShawnHymel 4 года назад
Thanks! Glad to hear it worked for you :)
@makifbuz
@makifbuz 3 года назад
Best explanation I have ever seen. Thank you.
@techtv1065
@techtv1065 4 года назад
This channel is so underrated.
@jontech_Lab
@jontech_Lab 3 года назад
well explained as usual mr Shawn
@MikePoirier
@MikePoirier 4 года назад
Great video on WebSockets. Loved it !
@ShawnHymel
@ShawnHymel 4 года назад
Thanks! Glad you liked it :)
@BlueyMcPhluey
@BlueyMcPhluey 2 года назад
Incredible, I had no idea this was possible
@Andre_Beth
@Andre_Beth 3 года назад
Well done, and thanks for not dragging it out.
@evilmode100
@evilmode100 2 года назад
Very nice guide and at the speed it must be :D
@MrCamdere
@MrCamdere 4 года назад
wow it looks like easy i will try it thanks for your time ! :)
@vectorsigma9903
@vectorsigma9903 2 года назад
Very useful. Thank you!
@rick_er2481
@rick_er2481 2 года назад
Awesome!!! Thanks Shawn!
@aefeq2
@aefeq2 Год назад
Nice tuto! Tks!
@cani77
@cani77 2 года назад
Thanks, great video and you code is amazing clear, reusable.
@MindSlapp
@MindSlapp 4 года назад
Excellent video
@colanuss4985
@colanuss4985 4 года назад
„A few months ago“ - man, feels more like ages. But as always, great work, clean code. Minor improvement could be made trough the use of a captive portal, which opens directly after connecting to the access point. thumbs up
@ShawnHymel
@ShawnHymel 4 года назад
LOL, ok, so like, 10 months is perhaps a bit longer than a "few" :P Agreed on captive portal, but I was keeping it simple for the sake of the video. It would make it much nicer to use. And then you could add an initial page in there that lets you attach the ESP32 to your local network :)
@Pr0xy_xx
@Pr0xy_xx 4 месяца назад
holy mother of god this video is gold
@taylorwhitt3974
@taylorwhitt3974 4 года назад
Well done.
@Sundae.
@Sundae. 2 дня назад
you are the GOAT, thank you
@KC5UNL
@KC5UNL Год назад
Clear (if a bit fast) description of how to do everything. Do you have an updated version for Arduino 2.0 IDE? The installation of tools doesn't seem to work the same.
@gujarisantamanyugmai
@gujarisantamanyugmai 4 года назад
Thank you. good understanding.
@ShawnHymel
@ShawnHymel 4 года назад
You're welcome!
@BharatMohanty
@BharatMohanty 4 года назад
After a looooooong time :)
@ShawnHymel
@ShawnHymel 4 года назад
LOL...I know.... I'm really hoping to do more :P
@fvgoya
@fvgoya 4 года назад
You have great content!!! May I ask Why you take so long time to upload?? Keep this channel live. This is a really good channel!!
@ShawnHymel
@ShawnHymel 4 года назад
Thanks :) I've been busy with other work, so I haven't had time to make videos. I'll try to post more.
@johannesremotigue9377
@johannesremotigue9377 11 месяцев назад
Nice, very powerful. Thank you/
@dansv9778
@dansv9778 3 года назад
Jesus, so much work for a led
@ShawnHymel
@ShawnHymel 3 года назад
I'm guessing you haven't seen my "speech recognition" LED demo yet :P
@Drowe71
@Drowe71 2 года назад
As someone just starting out and wanting it all, this looks enticing and step by step tutorial how can things go wrong. Well I have a SPIFFS mounting error despite it appearing to work as shown. So as a noob I have no idea how to fix this.
@theimagequestphotography
@theimagequestphotography 4 года назад
very nice video, how do you handle multiple led's or buttons? the data returned can't tell what device element is send info?
@nrdesign1991
@nrdesign1991 4 года назад
Thanks!
@capitanschetttino8745
@capitanschetttino8745 Год назад
Hey! nice to meet you! Liked and susbribed!!
@FPChris
@FPChris 3 года назад
Thanks for this. I got it working in 2021 with no issues btw. My next question what is the data transfer rate? I've read 10-20 mbps and 4 client max but then saw where it may now be 10 client max.... I guess I need to stress test it next to know for sure.
@FlurpBE
@FlurpBE 4 года назад
Great video, thanks! Apart from not requiring a message broker, what are the advantages of using websockets instead of mqtt messages?
@ShawnHymel
@ShawnHymel 4 года назад
WebSockets is useful if you want an open connection between two devices, and MQTT offers a publish/subscribe mechanism. For things like sensor data, you would probably want REST or MQTT. If you're looking for fast control (like driving an internet connected robot), something like WebSockets would be better. This is a useful discussion on the differences: iot.stackexchange.com/questions/1492/what-is-the-difference-between-mqtt-and-web-sockets-and-when-should-i-use-them
@yrrlicht6935
@yrrlicht6935 Месяц назад
short note for everybody doing this right now, you need an older version of arduino (1. smth) because in newer versions it doesnt show the arduino instalation folder
@paulispokemons7502
@paulispokemons7502 13 дней назад
it makes me angry :)
@corvoagc_yt
@corvoagc_yt 3 года назад
have anyone use the Ionic framework with an IoT project, I am trying to connect an application with the ESP8266 WiFi module and Arduino to be able to manipulate a solenoid to open/close a door with the smarthphone. I am trying to see if this can be feasible, do you have some advices for this beginner ? What modules can I use for this kind of project? It would be so helful
@kimacable
@kimacable 3 года назад
great video but why such brakeneck speed?
@leslymontufar9003
@leslymontufar9003 4 года назад
Hi, I'm still a beginner and I would like to ask.. To control ESP32 from anywhere, I need to use Firebase or anything like this? Another question is: Is it possible to ask the ssid and password of the user before the connection? Like making it a product and without having to upload the code again.. Is it possible? Thank you in advance! And thank you for doing this great tutorial !
@samsulbahridapurwebsite
@samsulbahridapurwebsite 3 года назад
great tutorial.. but this tutorial can run with esp 8266?
@4122inc
@4122inc 3 года назад
Great tutorial! I'm getting a "Error mounting SPIFFS" in the Serial Monitor window. Any advice on what I may be doing wrong? (sketch compiles and uploads to the ESP32 just fine--all libraries installed)
@ShawnHymel
@ShawnHymel 3 года назад
I haven't seen that one, so I'm not sure. Here are a few threads that are worth checking out that talk about that issue: github.com/espressif/arduino-esp32/issues/638 and github.com/me-no-dev/arduino-esp32fs-plugin/issues/8
@eduardomurphyperez717
@eduardomurphyperez717 Год назад
from OP's reply, what it worked for me was changing this line (located in line 122) "if !SPIFFS.begin()){" to this: "if( !SPIFFS.begin(true)){" So, just add true between the parenthesis, and upload it again, and run it (reset button) at least twice (mine was giving me an error on the first try)
@jacobavilacamacho7644
@jacobavilacamacho7644 4 года назад
Thank you very much for your video and I would like to ask you if is it possible to implement this kind of access point with Arduino UNO and its Wifi Shield?
@ShawnHymel
@ShawnHymel 4 года назад
Maybe...I think the UNO would run out of memory, though.
@woolfy02
@woolfy02 Год назад
I want to run a nodemcu with a servo. Is it possible to to have it connected to my wifi, and connect to it using my cell network?
@ikrammohamdi4439
@ikrammohamdi4439 6 месяцев назад
How do I adjust the LED ignition times?
@OneDirectiontoSA
@OneDirectiontoSA 4 года назад
Great tutorial thank you! I was wondering what to do if I would want to have this be accessible from an external IP? So that it can be accessible for anyone? (its for an artwork) I've got some cameras working and would like to control some servos through a separate esp32 to change the camera perspective
@ShawnHymel
@ShawnHymel 4 года назад
It is possible. You will need to do "port forwarding" in your router.
@OneDirectiontoSA
@OneDirectiontoSA 4 года назад
@@ShawnHymel Hi Shawn thanks for the quick reply! Well what I have now is using websockets to direct the camera images to go to a remote IP - but I'm struggling with how to add something like buttons to control other elements. Somehow I need to differentiate from the wroom and the camera.. Any suggestions?
@ShawnHymel
@ShawnHymel 4 года назад
@@OneDirectiontoSA what do you mean differentiate between the wroom and camera? Are they on separate IP addresses? As for adding more buttons and controls, it should be possible. You'll just need to replicate the code and add specific variables and WebSocket messages for the different buttons, LEDs, etc.
@scxry5597
@scxry5597 3 года назад
I have a very important question could you run php on there? It doenst seem so...
@TOMTOM-nh3nl
@TOMTOM-nh3nl 4 года назад
Thank You
@ShawnHymel
@ShawnHymel 4 года назад
You're welcome...glad it helped!
@mikejones-vd3fg
@mikejones-vd3fg Год назад
"call back function called init, in it we ... " lol
@SparQz
@SparQz 3 года назад
Could I use this to send pwm signals to a dimmable led driver and make a slider on the page? Sorry I'm new to esp 32 and not sure how much it's capable of.
@ShawnHymel
@ShawnHymel 3 года назад
Good question! You should be able to do that. You can send a number (say, 0 to 100) as the percentage of brightness to the ESP32 from the webpage and then update the PWM signal accordingly. I don't know a simple slider in HTML/JS, but this might be a good start: www.w3schools.com/howto/howto_js_rangeslider.asp.
@psd4942
@psd4942 3 года назад
Respected *Shawn Hymel* sir, I am a student, and literally the way you have teached electricity and electromagnetism is infinite wonderful!❤️ You have given us knowledge in the best way which nobody has ever given to us! In india , teachers don't teach us correctly, they just make. Us gulp the text written in the book. I request you teacher Shawn hymel that please try to teach us more physics like that you did in past(electricity, electromagnetism) I know making more such videos will take a lot of effort! But please try to help, Hope you will reply sir🙏🙏🙏👍❤️😁
@andreaceccarelli6897
@andreaceccarelli6897 4 года назад
Hello A beautiful video, it took me a lot to understand the use of the webSocket, I modified your code, to use a local network without using SoftAP (). I wanted to know why, from the local network it works very well, but although I opened the doors in the router, it does not work remotely. I also tried to change the server port, but still it is not open from outside. It would seem a problem of the library, have you done some tests also from outside? I thank you in advance for your kindness.
@thomas5477
@thomas5477 4 года назад
Have you forwarded the server port in your router to the ESP8266? And then, of course, you have to know your public IP (which changes very often), this you can find using www.whatismyip.com So you either need a static IP (which you won't get for little money), or you use a service like www.noip.com/remote-access
@andreaceccarelli6897
@andreaceccarelli6897 4 года назад
@@thomas5477 the problem is Fastweb router. Thare are problem with forwardet port. I have reset router and now its ok.
@ideafija
@ideafija 4 года назад
@@andreaceccarelli6897 Hi Andrea, I'm trying to do the same, but I still can't get it to work locally (on the same network), can you tell me what changes you made?
@devendrarathod7345
@devendrarathod7345 5 месяцев назад
hey, my esp32 is connected to weight scale(weight scale like we see at market) okay and i want to said this weight data to a server . how to do this plzzzz help
@ideafija
@ideafija 4 года назад
Thank you very much, it works perfectly for me, as it appears in the video, however I am trying to modify it so that it works for me on the same network and does not create a new one, I have tried different ways but the communication between me is cut off the page and arduino, why is this happening?
@ShawnHymel
@ShawnHymel 4 года назад
Not sure what's causing the connection to drop. Can you get this example to work (it doesn't use a soft AP)? ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-ZbX-l1Dl4N4.html
@kebabsharif9627
@kebabsharif9627 Год назад
How to make esp32 accessable from anywhere ,can you make a tutorial on that please.
@turkuas23626
@turkuas23626 2 года назад
why not using a standart web server and ajax?
@cristianchuquitarco3794
@cristianchuquitarco3794 2 года назад
Good video, error in "const char", why?
@jimswift4718
@jimswift4718 5 месяцев назад
Thanks for such a great video. It really helps me understand how this works. I followed your video and used your sketches but I get to the point where my phone renders the web page but the Button for Led is not highlighted so I can not press. Am I missing something? I am using a esp32 cam ai thinker
@yrrlicht6935
@yrrlicht6935 Месяц назад
i have the same problem as you, did you find a fix yet?
@jimswift4718
@jimswift4718 Месяц назад
@@yrrlicht6935 It has been some time but I don't think I ever got it to work.
@rameshnag20
@rameshnag20 4 года назад
Thanks! Although I tried to use the program without the esp32 connected to a laptop (5v battery source) but then I can't find the Wifi AP listing on any devices now. The program only works when the esp32 is connected to the laptop. Is there any way to fix this?
@ShawnHymel
@ShawnHymel 4 года назад
What kind of 5V battery? If it's one of those "phone charger" batteries, many of those have built-in circuitry to automatically turn off of not enough current is being drawn (and often, the ESP32 does not pull enough current compared to a smartphone). Try with other batteries or a regular LiPo if you have one.
@bennguyen1313
@bennguyen1313 Месяц назад
Any thoughts what would be involved in writing an ESP32 application, that takes data from the uart, and passes it wirelessly either via bluetooth** (SPP) or via Wifi? For Wifi, I imagine the ESP32 could act as a web server (TCP) and display the RS232 data, but maybe there's a UDP way it could send data to a PC on the same network? I imagine, if the receiving application (mobile or PC) is written in the flutter framework, it could display the RS232 data with style! **I purchase some USB-bluetooth dongles (Feasycom BP102, HC-05/HC-06/CP2102 master modules, etc).. but none can connect to any android phone! For example, when a Samsung S5 tries to connect to one of the bluetooth dongles, it will stop blinking, but after a couple seconds, Android says 'Can't communicate with the FSC_BP102' or HC-05, or HC06, etc.
@kevinpallado9638
@kevinpallado9638 4 года назад
Hi, I would like to ask the way around. How about create a node websocket server and client, and esp32 as an endpoint just to send data to server. Is that possible?
@ShawnHymel
@ShawnHymel 4 года назад
Yes, it is possible. You would want to use the HTTP client library with the a websocket client. Something like this would be a good start: www.google.com/amp/s/techtutorialsx.com/2017/11/01/esp32-arduino-websocket-client/amp/
@longngo2418
@longngo2418 4 года назад
Thanks bro for exciting video, i am studying to control many lights by Webserver. But i want to control each light by one esp8266. can you help me, get to me some advice to resolve this problem? Big thanks Bro
@kike_cubero
@kike_cubero 4 года назад
It would be great if the server and the client could connect to a local Wi-Fi network with internet access, and the Arduino will continue to act as a server in that local network.
@ShawnHymel
@ShawnHymel 4 года назад
You can do this, but instead of running WiFi.softAPIP() (WiFi access point), you would want to have the WiFi library connect to a local access point as a client (as shown in this example: github.com/espressif/arduino-esp32/blob/master/libraries/WiFi/examples/WiFiClient/WiFiClient.ino). From there, you could still run the WebServer and WebSocketServer code to respond to requests on your local network.
@kike_cubero
@kike_cubero 4 года назад
@@ShawnHymel That's cool, thx!
@panagiotiskondilis5068
@panagiotiskondilis5068 2 года назад
how can i publish esp webserver, public? How can i access the server through internet , without port forward ??
@larsmller4439
@larsmller4439 3 года назад
Hi Shawn, Super video, a big help thanks. I have a question about using static IP on the ESP32, I tried to implement it, but the ESP32 keeps giving me an exception, can you help? Regards Lars
@ShawnHymel
@ShawnHymel 3 года назад
I've not tried it with the ESP32 as the access point / host, but you may want to start here: randomnerdtutorials.com/esp32-static-fixed-ip-address-arduino-ide/
@drakkorvladimir4012
@drakkorvladimir4012 4 года назад
OK, Newer zip has a .java file which does not work. Older zip has the .jar file and it works.
@jenishthumar1904
@jenishthumar1904 4 года назад
Awesome video, can you please suggest logic to read multiple led status when button pressed. I'm making project to operate 10 device so when any switch pressed or when I refresh browser I wan to read status of all leds. Please suggest any logic you have that would be very helpful.
@ShawnHymel
@ShawnHymel 4 года назад
You'll need to make the strings that you send back and forth between the browser and ESP32 more complex to include an identifier for the LED or button.
@jenishthumar1904
@jenishthumar1904 4 года назад
@@ShawnHymel thanks for the reply, I'm converting state of every led in decimal value and in java script side decoding that value and checking every bit if it is 0 or 1 and changing colour accordingly. If you find any efficient way please reply.
@ShawnHymel
@ShawnHymel 4 года назад
@@jenishthumar1904 Not that I can think of right now. If you're encoding them as individual bits, that's about as efficient as you can get :)
@jenishthumar1904
@jenishthumar1904 4 года назад
Can you make video on how to set internal RTC of esp using Arduino ide. And accuracy of that RTC in normal condition.
@ShawnHymel
@ShawnHymel 4 года назад
@@jenishthumar1904 I don't have plans to work with the RTC at this time, but good to know there's interest!
@drakkorvladimir4012
@drakkorvladimir4012 4 года назад
I have done everything correct with the ESP32FS and tool folders but I do not see the uploader in my Arduino IDE???
@ShawnHymel
@ShawnHymel 4 года назад
Try restarting the IDE and making sure you have some ESP32 version selected as your board. What version of the IDE are you using?
@drakkorvladimir4012
@drakkorvladimir4012 4 года назад
@@ShawnHymel Did that several times. 1.8.5. Now the libraries have newer names so I am getting compile errors like: WebSocketsServer.h: No such file or directory I think the one I got from your link is named AsynWebSocket.h I used the arduino code from your website so I guess I'll have to change the include names. That is one thing I hate about Arduino and librarie updates
@pinyinxingming1821
@pinyinxingming1821 4 года назад
please can you do a tutorial that can teach us this from beginingn to end
@ShawnHymel
@ShawnHymel 4 года назад
This should be a beginning to end tutorial (although I do move a little quickly through the code). I recommend checking out my previous video to get familiar with using WebSockets on the ESP32: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-ZbX-l1Dl4N4.html
@rx6910
@rx6910 3 года назад
If I have a 4G module paired with ESP32, how can I share the 4G internet using ESP32 hotspot? So it's not only a web server without internet connection.
@ShawnHymel
@ShawnHymel 3 года назад
If it's 4G router, you'll likely need to use the ESP32 in client mode (instead of AP mode, which I believe I show in the video). Then, connect the ESP32 to the 4G router, and it should be connected to the Internet.
@diegomestrecam7674
@diegomestrecam7674 3 года назад
Hi. I havent modify your code, but when I open the web page, nothing shows up. I already uploaded the SPIFFS page to the ESP32. What can be the problem?
@ShawnHymel
@ShawnHymel 3 года назад
Are you getting any info from the serial monitor? Did you make sure that your phone/computer is attached to the ESP32's WiFi network (and not connected to other networks)?
@erico7222
@erico7222 4 года назад
I want to learn more JS applied on esp32. Is there any documentation regarding this? Thanks to this very informative video.
@ShawnHymel
@ShawnHymel 4 года назад
Please note that JS is not running on the ESP32. The ESP32 is just serving up a web page that contains JS elements, so in practice (almost) anything you can do in JS for websites, you can do here.
@erico7222
@erico7222 4 года назад
@@ShawnHymel can I also apply SASS on the web server?
@ShawnHymel
@ShawnHymel 4 года назад
@@erico7222 I'm not familiar with SASS....so, maybe?
@erico7222
@erico7222 4 года назад
sir do have documentation regarding esp32 on how to code on it?
@ShawnHymel
@ShawnHymel 4 года назад
@@erico7222 Here is getting started with the ESP32 using Arduino: randomnerdtutorials.com/installing-the-esp32-board-in-arduino-ide-windows-instructions/ and here is the official ESP32 documentation: docs.espressif.com/projects/esp-idf/en/latest/esp32/
@fouzaialaa7962
@fouzaialaa7962 4 года назад
can i put esp to sleep and still use the websocket ?? my project need to be asleep when not receiving data !!!
@ShawnHymel
@ShawnHymel 4 года назад
I'm not an expert on the ESP32, but I don't think you can put the processor to sleep, as it will shut off the WiFi. If you want to sleep in between received packets, you might want to loop at using basic TCP instead of WebSockets. Otherwise, you'll have to re-establish a WebSocket connection each time you wake up.
@fouzaialaa7962
@fouzaialaa7962 4 года назад
@@ShawnHymel my problem is the node is controlling a relay and the web server is the one that need to send the signal to open or close the relay ....i dont know the exact time i need to wake up .....the other solution is :since im already controlling a mains voltage device i can just tap into the mains and just keep the ESP always plugged in using a phone charger or something..... being on battery is cool but it cant be helped
@ShawnHymel
@ShawnHymel 4 года назад
@@fouzaialaa7962 you could have the ESP32 wake up at various intervals to check if the server has a variable set that tells it to flip the relay. I don't think you can wake up from a WiFi packet. Here is a good article on sleeping with the ESP32: www.google.com/amp/s/lastminuteengineers.com/esp32-deep-sleep-wakeup-sources/amp/
@nektarioskourakis8331
@nektarioskourakis8331 4 года назад
control lights or led from anywhere in the world ???
@ShawnHymel
@ShawnHymel 4 года назад
Pretty much :)
@user-rg1jp2us4o
@user-rg1jp2us4o 4 года назад
@@ShawnHymel Um no, Well it needs a static ip to do that. It only works when connected to the local network.
@ShawnHymel
@ShawnHymel 4 года назад
@@user-rg1jp2us4o if you port forward on your router, you should be able to control it from outside your local network
@tomtom0904
@tomtom0904 2 года назад
August!
@hopi9927
@hopi9927 2 года назад
Dear , Can you remake the project with micropython ?
@MuhammadBilal-eb6fh
@MuhammadBilal-eb6fh 4 года назад
Can we run videos on Arduino by using ESP32 module without or with Wifi?
@ShawnHymel
@ShawnHymel 4 года назад
The ESP32 is still probably too slow to run decent video. If you did a very small resolution (640x480?) and a low framerate (less than 10 fps?), you might be able to get something.
@MuhammadBilal-eb6fh
@MuhammadBilal-eb6fh 4 года назад
@@ShawnHymel Thanks.. Can you please guide me how i can run video on Arduino with resolution of (640x480)..
@ShawnHymel
@ShawnHymel 4 года назад
@@MuhammadBilal-eb6fh I won't be able to show you, but I can point you to another tutorial that might. What kind of screen do you have? For most of these microcontrollers, you're limited to SPI based LCD displays, so you'll want to start with a library like this: github.com/adafruit/TFTLCD-Library
@md.fakweruddinmazumder9063
@md.fakweruddinmazumder9063 2 года назад
Thank You sir
@nanditibroniassopi9521
@nanditibroniassopi9521 4 года назад
I want to ask, I think this is a stupid question. can this be accessed from anywhere? or only the local server
@ShawnHymel
@ShawnHymel 4 года назад
It's not a stupid question :) Right now, it's configured to be accessed locally: only things within range of the ESP32's WiFI can access it. However, if you add a router and configure the ESP32 to access the router as a client instead, you could easily broadcast the page to the wider Internet.
@nanditibroniassopi9521
@nanditibroniassopi9521 4 года назад
@@ShawnHymel thanks brother
@drakkorvladimir4012
@drakkorvladimir4012 4 года назад
EVerything working now except that ip address that populates all by itself..192.68.4.1 Not even my network? Why does this address keep coming up? Any help?
@ShawnHymel
@ShawnHymel 4 года назад
192.168.4.1 is the default IP set by the ESP32 when running in SoftAP mode. To change it, you'll need to use the softAPConfig method. See this example on how to do that: github.com/espressif/arduino-esp32/issues/985#issuecomment-360293942
@rockleejj123
@rockleejj123 3 года назад
Beginner, when I tried arduino uno : that is simple, let's go next. When I tried ESP32: what the fuck I am doing ....
@drakkorvladimir4012
@drakkorvladimir4012 4 года назад
I guess that nobody can help me assign a STATIC ip address to this?
@adaminsanoff
@adaminsanoff Год назад
Why not just use binary communication?
@rahmanisa899
@rahmanisa899 3 года назад
Great Video. Strange! in my phone, neither the ssid nor the password are shown. The phone only show "ESP_FDFAA5". It can connect without password and works well
@ShawnHymel
@ShawnHymel 3 года назад
Hmm...that is odd. I haven't encountered that before.
@diegomestrecam7674
@diegomestrecam7674 3 года назад
That happened to me. the password needs to be at least 9 characters long, mybe that hellps
@rahmanisa899
@rahmanisa899 3 года назад
@@diegomestrecam7674 thank you
@martinmacko7297
@martinmacko7297 4 года назад
Hi, could you help me please? I have ESP32 with web server but it always disconnects from wifi in cca 2-3 days. I do not know what to check. All work fine but after 2-3 days disconnected. Thx!
@ShawnHymel
@ShawnHymel 4 года назад
That may be your router requiring a reconnect after a while for all devices. Your best bet would be to put some code inside the loop of the ESP32 to check for a connection, and if it doesn't see one, try to reconnect.
@martinmacko7297
@martinmacko7297 4 года назад
@@ShawnHymel hi thanks a lot for reply! I am desperate... I had implemented pings from the server which pings or access http of esp32 periodically but did not help.... you think I need communucTion other way around? From esp out?
@ShawnHymel
@ShawnHymel 4 года назад
@@martinmacko7297 Yes, I would test to see if the ESP is still connected to WiFi from within the ESP. If it's not connected, re-run the WiFi connection sequence.
@martinmacko7297
@martinmacko7297 4 года назад
@@ShawnHymel can I ask you for som example or hint how to do it? I am not that good in coding. Many thanks!
@ShawnHymel
@ShawnHymel 4 года назад
@@martinmacko7297 I forgot this was using softAP, so there's no router involved. I haven't done anything with handling disconnects with softAP, so I don't have any examples for you. Some tutorials like this one might be useful: techtutorialsx.com/2019/09/22/esp32-soft-ap-station-disconnected-event/
@ferijalll
@ferijalll 4 года назад
why my project is "error mounting SPIFFS"???
@ShawnHymel
@ShawnHymel 4 года назад
I'm not sure. It could be a different ESP32 version. Check the versions of Arduino IDE, ESP32 libraries, and SPIFFS libraries. Certain versions of those may cause problems. You also may want to try erasing the flash: github.com/probonopd/WirelessPrinting/issues/106
@drumlightable
@drumlightable 4 года назад
I was getting this error but running the SPIFFS_Test example sketch fixed things (I think by formatting the spiffs) and is essentially what the final comment in Shawn's link recommends.
@peterkortvel
@peterkortvel 4 года назад
I had the same issue... it started working after a few reuploads
@WndSks
@WndSks Год назад
You can probably set a scale value of 1 in a meta viewport tag to fix the zoom issue on phones. Blame Apple for this.
@jonathandias3403
@jonathandias3403 3 года назад
is this the guy at sparkfun?
@ShawnHymel
@ShawnHymel 3 года назад
I was the guy at SparkFun ;)
@JadeclonOfficial
@JadeclonOfficial 3 года назад
Great video, but too fast
@daemdotosowolo952
@daemdotosowolo952 3 месяца назад
Response is slow... 😮
@G-REV_CHUCK
@G-REV_CHUCK 2 года назад
Tbh the way you explain things makes it too complicated.. would prefer simplified explanations as the drawn out explanation can be very confusing when trying to learn new things..
@user-qh4ii1su2g
@user-qh4ii1su2g 18 дней назад
U just stupid
@chant2012
@chant2012 8 месяцев назад
arduino sucks
@scoopiezz
@scoopiezz 3 месяца назад
All of that coding just to loose wifi and have one button and a little dot. wow.
Далее
ESP32 Web page creating and updating
32:11
Просмотров 150 тыс.
ESP32 DHT Web Server Project
5:53
Просмотров 104 тыс.
I Built 3 SECRET Rooms In School!
33:34
Просмотров 15 млн
Build an ESP32 Web Server with Arduino IDE
8:13
Просмотров 252 тыс.
ESP32 WebSocket Server
10:25
Просмотров 54 тыс.
I built my own computer. by hand.
13:03
Просмотров 1,1 млн