Hi,
I too have a problem with the official wi-fi shield.
I can successfully POST data to a target website. However, when I stop the client and disconnect, even though client.connected() reports that the wifi shield has disconnected the LINK LED on the shield remains lit, indicating that the connection is still present(?). This is the code I use to test :
delay(10000);
client.stop();
WiFi.disconnect();
if (client.connected())
{
Serial.println("Client is still connected");
}
else
{
Serial.println("Client is not connected");
}
Also note that I am using Arduino IDE 1.0.3 to produce the code.
Note that I include the 10 second delay to ensure that the shield has plenty of time to POST the data (and it does succeed in transmitting data to the target server).
Has anyone else had this issue? Anyone know of a fix or a workaround?
FYI I want to only turn on the shield when I need to POST following a sensor trigger; I want to get as much battery life as possible. If Supermechanical's Twine device can get weeks of wifi operation from 2 AA batteries, then surely we can get the Arduino + wifi shield to behave similarly?