logo elektroda
logo elektroda
X
logo elektroda

How to configure the ESP32 to act as a WiFi server - example code

kacpo1 879 2
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 17671879
    kacpo1
    Level 33  
    Welcome.

    I have recently become interested in the ESP32 board. I installed the board in the Arduino IDE, downloaded the libraries and in order to learn the principle of operation (how to program it) I looked for a sample program on the internet. I found one like this :

    Code: C / C++
    Log in, to see the code
    .
    (I have slightly modified the original)
    I would like to know if there is any possibility, using this library, to redirect a given customer to another subpage? That is, after clicking on the redirect button on "/LED", wait for e.g. 10 seconds and then redirect it back to "/" (i.e. the start page).
    The second question is how do I use the microcontroller to read the data entered into the frame on the page?
    Is it possible to use CSS? If so, in what way?
    Maybe there is a way to send all the HTML code at once, rather than line by line? It would make writing the page much easier.
    Do you have a problem with Arduino? Ask question. Visit our forum Arduino.
  • ADVERTISEMENT
  • #2 17672909
    kolgreen
    Level 16  
    Take an interest in #include <ESP8266WebServer.h>
    https://tttapa.github.io/ESP8266/Chap10%20-%20Simple%20Web%20Server.html

    Subpage redirects using JavaScript can be done. Css can also be plugged in (address to css as to another subpage).

    kacpo1 wrote:
    how to use a microcontroller to read data entered into a frame on a page?
    .

    I don't understand...

    kacpo1 wrote:
    Maybe there is a way to send the entire HTML code at once, rather than line by line?


    Maybe to the variable

    Code: C / C++
    Log in, to see the code
ADVERTISEMENT