I just bought a WiFiShield for my arduino UNO. I came up with this idea to control a servo from a website but also from an app on my windows phone. From the website i can type in a value between 0-180 degree and then submit. It works fine! BUT! The app i wrote for my windows phone uses a slide that goes from 0-180. Each time the slide "slides" it sends the value to my server (arduino). The servo starts moving but after a while it stops, seems like the arduino crashes or something. I think its because of the large amount of data that is sent from my phone and somehow the arduino cant keep up.
Is there anyone that knows what the problem is?
Does the WiFiShield have any supports for UDP packets? Maybe it could be a solution for the bad response time.
char ssid = "???";
char pass = "???";
int keyIndex = 0;
int status = WL_IDLE_STATUS;
while (status != WL_CONNECTED)
Serial.print("Attempting to connect to SSID: ");
status = WiFi.begin(ssid, pass);
// listen for incoming clients
WiFiClient client = serverTCP.available();
String buffer = "";
char c = client.read();
buffer += c;
if(c == '\r')
buffer = "";