There is a PHP file that is updated with a certain set of variables that is then dumped into a json file that is read by the robot every 3 seconds or so.
It seems to go well until I connect to the website at which point I seem to have a sporatic connection to the server. I've tried a couple different servers, and the speed should be fine. But when I add this if statement within the while connected loop:
Code: Select all
while (www.connected() && (millis() - lastRead < IDLE_TIMEOUT_MS)) {
if (www.available()) {
Serial.println("connected");
} else {
Serial.println("NOT connected");
}
Does anyone know what might be causing the issue with the connection? Full code is posted in the attached text.