Help writing script

Hi,

I am new here so I apologize if it is in the wrong category.
I am trying to write a script to connect & stay connected to wifi, and then every 5 minutes get a predefined url, and show the output of the url on to a SSD1036 display refreshing every 5 min with the new output of the predefined url.

I tried example scripts and I got different parts to work but I can not piece it all together.

I have an Arduino Uno R4 Wifi and SSD1036

Any ideas?

Thanks so much

Start with the code that displays on the SSD1036. See if you can code a timer using millis to count seconds and show the count on the screen.

so you have all the pieces to get it working

What are you asking ? for someone to develop that for you ? Most helpers here won't do that, we would provide guidance if you give it a try, post your code and circuit (as detailed in "How to get the best out of this forum") with information about what problems you are hitting

the structure of the code should not be too difficult.

void setup() {
  // configure pins and screen
  ...
  // configure WiFi to handle automatic reconnection in case of disconnect
  ...
  // connect to WiFi
  ...
} 


void loop() {
  // send the GET request to the predefined URL
  ...

  // if there is no error in the request
 if (request is OK) {
    //  extract suitable information
    ...

    // display info
    ...

  }

  // wait for 5 minutes (on ESP32 will sleep the task so better than active wait using millis)
  delay(300000ul); 

}

Did you mean SSD1306?

In most cases, the response payload from a web server is an HTML page. Arduino cannot display this to any kind of display. The code to display HTML pages is very complex. It is what a Browser App on your phone or laptop does.

However, it may be possible to extract a few key values from a web page and display only those on a display. If the response payload is in JSON format, this is also easier.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.