diff --git a/Readme.md b/Readme.md index e69de29..81b6cbe 100644 --- a/Readme.md +++ b/Readme.md @@ -0,0 +1,8 @@ +# How to use it +This example pushes the measured data using HTTP POST request on ThinkSpeak server. +Thus, modify the APIKey in `thingSpeak.cpp`, then compile using: + +```bash +g++ thingSpeak.cpp network/SocketClient.cpp - o thingSpeak +./thingSpeak +``` diff --git a/thingSpeak.cpp b/thingSpeak.cpp index 779c2fc..1b7b7cf 100644 --- a/thingSpeak.cpp +++ b/thingSpeak.cpp @@ -33,7 +33,7 @@ int main() { head << "POST /update HTTP/1.1\n" << "Host: api.thingspeak.com\n" << "Connection: close\n" - << "X-THINGSPEAKAPIKEY: Z7PNWRYKDEBRX5F7\n" + << "X-THINGSPEAKAPIKEY: 621LKPK58GD7PHSB\n" << "Content-Type: application/x-www-form-urlencoded\n" << "Content-Length:" << string(data.str()).length() << "\n\n"; sc.send(string(head.str()));