I'm working with a try{} catch(){} exception right now and I want to change a Variable. For this my board has to connect to the Internet and with a try{} statement it will try to do so. If it fails I simply want to set the variables to 0.
I am getting this error: Compilation error: expected type-specifier before ')' token
I know that I somehow have to pass my variables into the catch() "function" but somehow I can't pass variables in like I would with normal functions.
I’m not even sure try-catch is supported on the esp8266 nor if any of the function you call would raise an error
NTPClient::update() returns a boolean indicating if updating was successful (it will only attempt an update every updateInterval ms (every minute if you did not modify the default setting) and you will see false only when the function actually attempted to connect to the NTP server for an update, and that update failed. I think The time library will continue with the last synced time though
Well actually I don't want to force the data to zero. But this is supposed to be a clock and I want it to start counting from zero if there's no Internet connection the first time you start it.
what I don't know is what the NTP client will do if it has no internet the first time its started. If it won't absolutely break my code it doesn't matter.