![](/media/cache/group/TVZ_logotip.png.50x50_q85.jpg)
Uploading sensor data (voltage divider, MAX4172, INA219) over Ethernet to Thing Speak service. Uses old mbed revision that is compatible with NetServices library. I2C communication is made with I2CR library.
Dependencies: C12832 I2CR INA219 NetServices mbed
Fork of NetServices_HelloWorld by
Diff: ThingSpeak.h
- Revision:
- 6:ebbde59c5a1d
- Child:
- 7:1da0a084cd69
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ThingSpeak.h Fri Nov 20 08:28:11 2015 +0000 @@ -0,0 +1,32 @@ +#ifndef THINGSPEAK_H +#define THINGSPEAK_H +#define HOSTNAME "mbed" +#include "mbed.h" +#include "EthernetNetIf.h" +#include "HTTPClient.h" + + +class ThingSpeak { + + public: + + ThingSpeak(char*, const int); + void connect(); + void getIP(); + void putUp(); + void setField(float, int); + private: + + char* thingSpeakUrl; + char* thingSpeakKey; + char urlBuffer[511]; + char fieldBuffer[255]; + EthernetNetIf eth; + EthernetErr ethErr; + HTTPClient http; + IpAddr ethIp; + HTTPText resp; + HTTPResult res; +}; + +#endif \ No newline at end of file