ESP8266 Web Server HTML, JavaScript, and AJAX Webpages Using Arduino IDE (Mac OSX and Windows)

preview_player
Показать описание
• Your support helps me post videos more frequently:
BTC: 1ZpLvgETofMuzCaKoq5XJZKSwe5UNkwLM
==========
• Find me on:
==========
• My shops:
==========
• Description:
As before, the webpage that's served includes a button element. When the button is clicked, the request that's sent to the web server makes the ESP8266 toggle on and off the built-in LED on the development board.
One of the most common tasks when using the ESP8266 is setting it up as a device that connects to a network and responds to traffic on it (i.e., a web server). I wanted to show you, in detail, how to take things further and serve webpages in response to specific requests.
==========
• Related vids:
==========
• Project parts:
ACROBOTIC Development Board for ESP8266:
==========
• Project code:
Firmware for the Arduino IDE:
More info about JavaScript:
More info about AJAX (XMLHttpRequest class):
==========
• Music:
==========
#ESP8266 #Arduino #Tutorial
Рекомендации по теме
Комментарии
Автор

Great video. I have an ESP8266 serving a website and working. I'm sending and XML data and using AJAX to only update the data, so text and animated bars showing levels all update nearly real time. My data comes in every second. However...every say 10 seconds my web page sites idle for 2-3 seconds. And that is when the web is connected through my local router. In a test where i'm using port forwarding to let someone else see the web page, it may update ever 5 seconds. My web page has around 50 values that are getting updated.


I realize you can't see my code, but if the system were written correctly (not saying it's not), but do you feel this performance is about right? Seems slow but i'm not sure I can expect much from a small $3 web server. If you feel it's slow, i'll dig into it. I may consider web sockets, however my data flow only from server to client.


Thoughts?

KrisKasprzak
Автор

another perfect tutorial
actually you brought one of my old projects on desk again
i have built a conditioner control with esp and a simple web page to control it but i always had trouble to see the real time stat of it for every other people who connects to it i guess this part was made only for me XD
thanks again for another perfect tutorial keep it up

TheAlibigdeli
Автор

thank you - but when LED is ON and refresh the web page LED go OFF ??

mostafagaberahmed
Автор

Hey Cisco! Keep up the ESP8266 tips. I am exercising it right now. Thanks!

luisfelipegola
Автор

Sir, i have question that, is't it possible to send a sensor data to website or web page which i can decide but not to nodemcu web server

nitheshkulal
Автор

Hi Cisco! I'd like to ask you two questions: If I have already the esp8266 set as web server and can send command from client to esp, how I can send data viceversa, I mean, from two distance sensors connected on the esp8266 to the client (web page) using AJAX. The example you show us is to send commands on and off to the esp8266 to light up a led. Is it possible from that same code to send any other sensor data and display it on the web page. Thanks in advance, Rubén.

rubenmorenog
Автор

Great video !! Just what I need, thnxs for sharing !

PhG
Автор

Another great tutorial acrobotic. Congrats. But is their another way so that I can import HTML files into arduino project? Because that would be more modular from my point of view.

sanketbhamre
Автор

Nice tutorial! How can we update dynamically the state of the LED without having to reload the page or press on a button on the web page in your example? Let's say I change the state of the LED on the Wemos with something else (reading a physical switch) but I want the Wemos to update dynamically the LED state on the web page? The arduino code should push a value to the web page on it's own. HTTP Put?? I'm sure it is simple but can't figure out how to do it for this simple example. Thanks for your help!

JeanPierreLavoie
Автор

Thank you for your videos, I would like to do a similar thing but instead of simple html page written inside the arduino IDE I'd like to make an angular application.
So can I host angular application on ESP8266 and, at the same time, using it as a webserver to process the requests make from client-side (angular)?
you help would be very usefull, thanks a lot.

andreadellamaggiora
Автор

Hi, this is a great tutorial!Thanks!What about if i wanto to add also a simple CSS file?
Thanks :)

FrankP
Автор

Hi sir. Can I know the IP address on video 7:44 seconds is that IP address of your wifi or nodemcu ?

surenarumugam
Автор

Great video as always.
One issue I get is when the page is refreshed the led will toggle.
For example if I open a new browser lets say on a phone the led will toggle without pressing the html button.
Is there a way to stop that?

paulthecurtains
Автор

Hi thanks for this tutorial
May i ask how can i redirect every website visited to the ip adress of the esp8266 ?

saulbadman
Автор

In this tutorial You managed to toggle one LED by calling getLEDState, but is it possible to call the same function with some parameter-option to toggle say blue, green or red LED???

janvaris
Автор

heey sir that's a perfect tutorial so i've been loooking for a way to activate the funcion automatically and i found about settimeout and setintervall so i tried it and guess what the led blinks by itself and the data is refreshed automatically with no button, so thank you for clearing the way.

med
Автор

Is it necessary to use Arduino editor .Can I access Arduino by functions or any other way in another editors like atom and sublime text using any web languages

dhruvildoshi
Автор

dude when you edit your videos put the speed in x1.5 really gona help you ;)

gabmax
Автор

Hi I have Arduino Mega is it possible to control several things what is connected to Arduino via esp-01 ore similar esp??? And if it is possible, then maybe you can suggest something how to do that???

janvaris
Автор

sir did you have a tutorial about how esp8266 client communicated with esp8266 server that it can do feedback, i mean like chating

farizwijayanto
visit shbcf.ru