I managed to get this working yesterday afternoon. My WiFi setup code is:
WiFi.begin();
while (WiFi.status() != WL_CONNECTED)
{
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.println("WiFi connected");
Serial.println("IP address: ");
Serial.println(WiFi.localIP());
Note the WiFi credentials are not used in the WiFi.begin method as the Oak sorts that out.
My code to post the data to Sparkfun's data service is:
strcpy(url, phantPage);
strcat(url, "?private_key=*********************");
strcat(url, "&airpressure=");
strcat(url, ftoa(number, pressure / 100, 0));
strcat(url, "&groundmoisture=0");
strcat(url, "&groundtemperature=0");
strcat(url, "&temperature=");
strcat(url, ftoa(number, temperature, 2));
strcat(url, "&humidity=");
strcat(url, ftoa(number, humidity, 2));
strcat(url, "&luminosity=");
strcat(url, ftoa(number, lux, 2));
strcat(url, "&rainfall=0");
strcat(url, "&ultravioletlight=");
strcat(url, ftoa(number, ultraviolet, 0));
strcat(url, "&winddirection=0");
strcat(url, "&windspeed=0");
//
// Send the data to Phant (Sparkfun's data logging service).
//
Serial.print("URL: ");
Serial.println(url);
http.begin(phantDomain, 80, url);
int httpCode = http.GET();
Serial.print("Status code: ");
Serial.println(httpCode);
String response = http.getString();
DebugMessage((char *) response.c_str());
Where phantPage is set to /input/StreamPublicKey and phantDomain is data.sparkfun.com
Hope this helps,
Mark