ESP32-C6 interactive webpage

Marius28
Posts: 15
Joined: Sat Oct 28, 2023 4:23 pm

ESP32-C6 interactive webpage

Postby Marius28 » Fri Nov 03, 2023 3:54 pm

Hello all,

i'm searching for an example or better a tutorial about an interactive webpage that is displayed via my wifi access point.
My wifi access point and the http server is already running on my ESP32-C6.
I have an index.html, some other .html files and .css files onto the mcu doing it with spiffs filesystem.


First of all i'm struggling with my .css files, these aren't loaded by default when i log in to my access point, go to the browser window, type in the ip address there is only my index.html file loaded.
Part of index.html, directory storage was created by spiffs filesystem and index.css was uploaded

Code: Select all

<link rel="stylesheet" type="text/css" href="storage/index.css">
I get the error that the uri /storage/index.css was not found on my system., how to link to the index.css file on my storage partition?
It works fine if i place my css code into the html file.


Second thing im thinking about is how to get data typed in a field of my webpage to my c code and send back this value to another field in my html file, so that there will be no reload of the page or something. Is it possible with the normal http server or do i need something else?


On google i only found several examples by the Arduino IDE, where it seems to be very simple to load any .html files and .css files onto to webserver plus to playce a variable in the .html code to read it out in the arduino c code. Unfortunately the ESP32-C6 is not supported by the official arduino ide so far.
Maybe anybody know a good example or tutorial for this with the ESP-IDF?

username
Posts: 512
Joined: Thu May 03, 2018 1:18 pm

Re: ESP32-C6 interactive webpage

Postby username » Sun Nov 05, 2023 6:37 pm

Check this out. Its not free, but it covers the things you asked about.
https://learnesp32.com/

I bought it when it was on sale, and there are many great things in there.

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 98 guests