Hi again,
My latest problem concerns the “client.flush” function. It’s obviously very useful to make sure the right TCP packets are being recieved but I’m having “overloading” errors with it.
Here is the relavant fragment of code:
if (client.connected()) {
while (client.available()) {
f = client.read();
delay(100);
Serial.println("The Incoming Byte is: ");
Serial.print(f);
client.flush();
delay(1000);
if(f = 1){
char x;
x = client.read();
Serial.println("Value is: ");
Serial.print(x);
Serial.println(“Value printed once”);
client.flush;
}
else if(f = 2){
char y;
y = client.read();
Serial.println("Value is: ");
Serial.print(y);
Serial.println("Value is: ");
Serial.print(y);
Serial.println(“Value printed twice”);
client.flush;
}
}
If I comment out the client flush functions it compiles fine but I’d rather have them there in case my sender is faulty.
Thanks for any help or suggestions