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.cpp
- Revision:
- 7:1da0a084cd69
- Parent:
- 6:ebbde59c5a1d
diff -r ebbde59c5a1d -r 1da0a084cd69 ThingSpeak.cpp --- a/ThingSpeak.cpp Fri Nov 20 08:28:11 2015 +0000 +++ b/ThingSpeak.cpp Sun Nov 29 13:41:05 2015 +0000 @@ -5,7 +5,7 @@ Serial pc(USBTX, USBRX); -ThingSpeak::ThingSpeak(char* Key, const int Qt) : thingSpeakKey(Key) { +ThingSpeak::ThingSpeak(char* Key) : thingSpeakKey(Key) { thingSpeakUrl = "https://api.thingspeak.com/update"; urlBuffer[0] = 0; fieldBuffer[0] = 0; @@ -16,15 +16,15 @@ EthernetErr ethErr = eth.setup(); if(ethErr){ pc.printf("Error %d in ethernet setup.\r\n", ethErr); - //* connect(); + connect(); } pc.printf("Ethernet setup OK\r\n"); } - +/* void ThingSpeak::getIP() { } - +*/ void ThingSpeak::setField(float field, int i) { char fieldi; char fieldShortBuff[8];