ESP32 web SDcard interface turn pins and send data

mariliahoshino
Posts: 1
Joined: Mon Aug 31, 2020 1:19 am

ESP32 web SDcard interface turn pins and send data

Postby mariliahoshino » Mon Aug 31, 2020 1:47 am

Image

I have this code running in
https://www.w3schools.com/code/tryit.as ... 0Q23927UXH

the example is
https://github.com/espressif/arduino-es ... ver/SdRoot

but the example don't learn how turn on/off pins I tried a lot of but I don't have ideia

The webpage is in SDCard, after I'll update images and SDCard there is space for this

I'll make a ESP HTML interface with communication CAN
https://github.com/mariliahoshino/Proto ... _interface

thanks

ESP_Sprite
Posts: 9043
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32 web SDcard interface turn pins and send data

Postby ESP_Sprite » Mon Aug 31, 2020 7:27 am

I think you're misunderstanding the script-tag in html. It denotes Javascript, which runs on whatever machine that views the HTML. In other words, if 'digitalWrite' was a valid Javascript function, you would turn on a GPIO on your computer or mobile phone or whatever you use to watch the webpage. (It's not a valid function, though, so in reality you'll just get an error.) If you want to actually turn on/off a GPIO on the ESP32 (or do anything else on the ESP side), you would have to have the html page send a request to the ESP32 to do that, either using AJAX or an 'old school' HTML POST action. Not sure where to find examples for the Arduino SDK for that, although I'm sure there are some out there.


Who is online

Users browsing this forum: No registered users and 35 guests