Total Newb at web page on Nano 33 IOT

Ok I have this Covid tracker software which was written for another type screen than mine. I have a very simply I2C display with No touch screen. I am trying to figure out ( Learn ) how to go to this covid tracker page and do the following,

Select new data to download and display i.e. " new cases "
go to the U.S. and select States to download. i.e. Texas and display the same data

I am a complete newb at web pages. this is my first attempt to do anything like this. So the code is a great mystery. ( // Notes are always appeciated )

I have tried to delete this unused code but have more errors than i can count. I am sure i am making this harder than it has to be. I just dont understand it yet.

Please help…

covidtracker_cleaned.ino (11 KB)

Oh and it is weird, but i have to start the serial monitor before anything starts. I can then turn off the computer and it still works. But if i hook it to a usb battery........ nothing happens........ and teh Us recovered is ALWAYS 0 ??? what am I missing ???

chordlines: Oh and it is weird, but i have to start the serial monitor before anything starts. I can then turn off the computer and it still works. But if i hook it to a usb battery........ nothing happens........ and teh Us recovered is ALWAYS 0 ??? what am I missing ???

The following lines in your code make the Arduino wait until you open Serial Monitor.

while (!Serial) { ; // wait for serial port to connect. Needed for native USB port only }

You can comment the code or write a little time out function. I use a time out so I can start debugging and read all messages when I connect the Serial Monitor, but the boards starts by itself after 30 seconds or so.