Library for writing and reading on ThingSpeak with ethernet
Fork of ThingSpeakEthernet by
Diff: ThingSpeak.cpp
- Revision:
- 1:ea7f0ef29ef5
- Parent:
- 0:a7bce9e88175
--- a/ThingSpeak.cpp Mon Jun 05 08:17:19 2017 +0000 +++ b/ThingSpeak.cpp Thu Jun 08 18:28:20 2017 +0000 @@ -11,6 +11,7 @@ urlBuffer[0] = 0; fieldBuffer[0] = 0; } + float ThingSpeak::pull(long int readKey, int field) { sprintf(urlBuffer, "%s%d/fields/%d/last", thingSpeakRead, readKey, field ); pc.printf("URL Buffer request: %s ", urlBuffer); @@ -25,6 +26,7 @@ return false; } } + void ThingSpeak::connect() { pc.printf("Setting up Ethernet...\r\n"); EthernetErr ethErr = eth.setup(); @@ -34,11 +36,7 @@ } pc.printf("Ethernet setup OK\r\n"); } -/* -void ThingSpeak::getIP() { - -} -*/ + void ThingSpeak::setField(float field, int i) { char fieldi; char fieldShortBuff[8];