sent data to server
Posted: Mon Jan 11, 2016 8:31 am
Hello!
How can i send data to a server like the dht22_thingspeak demo?:
os_sprintf(data, "http://%s/update?key=%s&field1=%s&field2=%s&status=dev_ip:%d.%d.%d.%d", THINGSPEAK_SERVER, THINGSPEAK_API_KEY, temp, hum, IP2STR(&ipConfig.ip));
http_get(data, "", thingspeak_http_callback);
I try to insert the code from dht22_thingspeak demo into the esphttpd demo, but it did not work.
I think there is a way to sent data in the esphttpd demo using:
sint8 espconn_send(
struct espconn *espconn,
uint8 *psent,
uint16 length
)
But my question is how do i do that?
Thanks!
How can i send data to a server like the dht22_thingspeak demo?:
os_sprintf(data, "http://%s/update?key=%s&field1=%s&field2=%s&status=dev_ip:%d.%d.%d.%d", THINGSPEAK_SERVER, THINGSPEAK_API_KEY, temp, hum, IP2STR(&ipConfig.ip));
http_get(data, "", thingspeak_http_callback);
I try to insert the code from dht22_thingspeak demo into the esphttpd demo, but it did not work.
I think there is a way to sent data in the esphttpd demo using:
sint8 espconn_send(
struct espconn *espconn,
uint8 *psent,
uint16 length
)
But my question is how do i do that?
Thanks!