Hi Everyone,
I am able to control the Motor through the ESP32 wifi webserver and I am using PWM technique to control the Motor. Now I need this PWM values to be shown on the webserver instead of the serial monitor. Could anyone please let me know ,How do i do this ?
Thanks in Advance
regarding webserver
-
- Posts: 9730
- Joined: Thu Nov 26, 2015 4:08 am
Re: regarding webserver
What environment and webserver are you using? Can we see your code? What did you already try yourself and what did it do?
Re: regarding webserver
Starting from basics:
Webpages are static. Your browser requests a page, you serve and that page gets rendered and displayed. End of transaction. Still screen.
So how do you get 'dynamic data' (time varying data) into your webpage?
EDIT: In order to update your browser rendering you need code (Javascript) running within your browser. You browser code may construct its own values (e.g. run an animation) or may fetch values from your server. Your choice. The following describes fetching approaches which is the substance of your question.
The clasic (fetch) approaches are AJAX/AJAJ. Research on w3schools. These days you also have mqtt and websockets to play with.
IMHO AJAX/AJAJ properly done is better documented and gives you easier interoperability. I can drive my products in a few VBA (Excel, Word etc) lines and so pass test automation to a reasonable hardware engineer.
MQTT/Websockets are a little more esoteric. I can also test an AJAX request on a browser, MQTT tests require a plug in and generally more hastle. Don't get me wrong MQTT has its place but (without knowing your exact requirements) AJAX/AJAJ seems at an easier starter.
Anyway, thats the crux. You need browser side code to update the (browser side) HTML/CSS DOM using javascript be that AJAX, MQTT or other protocol.
Webpages are static. Your browser requests a page, you serve and that page gets rendered and displayed. End of transaction. Still screen.
So how do you get 'dynamic data' (time varying data) into your webpage?
EDIT: In order to update your browser rendering you need code (Javascript) running within your browser. You browser code may construct its own values (e.g. run an animation) or may fetch values from your server. Your choice. The following describes fetching approaches which is the substance of your question.
The clasic (fetch) approaches are AJAX/AJAJ. Research on w3schools. These days you also have mqtt and websockets to play with.
IMHO AJAX/AJAJ properly done is better documented and gives you easier interoperability. I can drive my products in a few VBA (Excel, Word etc) lines and so pass test automation to a reasonable hardware engineer.
MQTT/Websockets are a little more esoteric. I can also test an AJAX request on a browser, MQTT tests require a plug in and generally more hastle. Don't get me wrong MQTT has its place but (without knowing your exact requirements) AJAX/AJAJ seems at an easier starter.
Anyway, thats the crux. You need browser side code to update the (browser side) HTML/CSS DOM using javascript be that AJAX, MQTT or other protocol.
& I also believe that IDF CAN should be fixed.
Who is online
Users browsing this forum: Google [Bot] and 83 guests