printWiFiStatus(); not declared in this scope

I’m not entirely sure why this isn’t working, its a edited version of the WiFi101 WiFiWebClientRepeating Demo. I’ve only added things, not changed anything from the original. It’s worked before, I tried adding a goto so i could to repeat the initial connection process with the push of a button if disconnected, and it seemed to mess everything up so i quickly discarded that. Below is my code… Any help with the error and also working in a repeat with a button press would be much appreciated. Thanks

WiFiWebClientRepeating.ino (3.6 KB)

Auto Format your code in the IDE and look at the end of the httpRequest() function

Here is what I see

void httpRequest()
{

//several lines of code here

}
}

What are those two } doing there ?

UKHeliBob:
Auto Format your code in the IDE and look at the end of the httpRequest() function

Here is what I see

void httpRequest()

{

//several lines of code here

}
}




What are those two } doing there ?

Ah! didn’t see that. Thanks so much. Should i be putting a void in front of the printWiFiStatus on line 90?

Should i be putting a void in front of the printWiFiStatus on line 90?

Do you know the meaning of void in front of a function definition ?

no, that's why I'm asking. And any help with using a button to reset to the very beginning?

Every function definition must have a data type before its name indicating which data type it will return to teh calling program. If no data is to be returned then the data type void is used.

When a function is called no data type is used before the name. Using the Arduino functions such as pinMode(), digitalWrite() etc are examples of this.

As to your question

Should i be putting a void in front of the printWiFiStatus on line 90?

This is line 90 of the code that you posted
void httpRequest() {so I don't understand the question.

Please post your code as it is now with the correction made to the end of the httpRequest() function