first versione of ThingSpeak IOT library (not tested)
thingspeak.h@0:92f5363c7790, 2014-04-04 (annotated)
- Committer:
- mbedakhela
- Date:
- Fri Apr 04 13:44:43 2014 +0000
- Revision:
- 0:92f5363c7790
first version of thingspeak IOT library; not tested
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbedakhela | 0:92f5363c7790 | 1 | /* ************************************************************************** |
mbedakhela | 0:92f5363c7790 | 2 | * |
mbedakhela | 0:92f5363c7790 | 3 | * |
mbedakhela | 0:92f5363c7790 | 4 | * |
mbedakhela | 0:92f5363c7790 | 5 | * |
mbedakhela | 0:92f5363c7790 | 6 | * ************************************************************************** |
mbedakhela | 0:92f5363c7790 | 7 | * FileName: thingspeak.h |
mbedakhela | 0:92f5363c7790 | 8 | * Dependencies: |
mbedakhela | 0:92f5363c7790 | 9 | * Module: |
mbedakhela | 0:92f5363c7790 | 10 | * Compiler: |
mbedakhela | 0:92f5363c7790 | 11 | * |
mbedakhela | 0:92f5363c7790 | 12 | * Author Rev. Date Comment |
mbedakhela | 0:92f5363c7790 | 13 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
mbedakhela | 0:92f5363c7790 | 14 | * Stefano Lai 1.0 03/27/2014 First release |
mbedakhela | 0:92f5363c7790 | 15 | * |
mbedakhela | 0:92f5363c7790 | 16 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
mbedakhela | 0:92f5363c7790 | 17 | * |
mbedakhela | 0:92f5363c7790 | 18 | * Software License Agreement |
mbedakhela | 0:92f5363c7790 | 19 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
mbedakhela | 0:92f5363c7790 | 20 | * This is free software; you can redistribute it and/or modify it under |
mbedakhela | 0:92f5363c7790 | 21 | * the terms of the GNU General Public License (version 2) as published by |
mbedakhela | 0:92f5363c7790 | 22 | * the Free Software Foundation AND MODIFIED BY OpenPicus team. |
mbedakhela | 0:92f5363c7790 | 23 | * |
mbedakhela | 0:92f5363c7790 | 24 | * ***NOTE*** The exception to the GPL is included to allow you to distribute |
mbedakhela | 0:92f5363c7790 | 25 | * a combined work that includes OpenPicus code without being obliged to |
mbedakhela | 0:92f5363c7790 | 26 | * provide the source code for proprietary components outside of the OpenPicus |
mbedakhela | 0:92f5363c7790 | 27 | * code. |
mbedakhela | 0:92f5363c7790 | 28 | * OpenPicus software is distributed in the hope that it will be useful, but |
mbedakhela | 0:92f5363c7790 | 29 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
mbedakhela | 0:92f5363c7790 | 30 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
mbedakhela | 0:92f5363c7790 | 31 | * more details. |
mbedakhela | 0:92f5363c7790 | 32 | * |
mbedakhela | 0:92f5363c7790 | 33 | * |
mbedakhela | 0:92f5363c7790 | 34 | * Warranty |
mbedakhela | 0:92f5363c7790 | 35 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
mbedakhela | 0:92f5363c7790 | 36 | * THE SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT |
mbedakhela | 0:92f5363c7790 | 37 | * WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT |
mbedakhela | 0:92f5363c7790 | 38 | * LIMITATION, ANY WARRANTY OF MERCHANTABILITY, FITNESS FOR A |
mbedakhela | 0:92f5363c7790 | 39 | * PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL |
mbedakhela | 0:92f5363c7790 | 40 | * WE ARE LIABLE FOR ANY INCIDENTAL, SPECIAL, INDIRECT OR |
mbedakhela | 0:92f5363c7790 | 41 | * CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF |
mbedakhela | 0:92f5363c7790 | 42 | * PROCUREMENT OF SUBSTITUTE GOODS, TECHNOLOGY OR SERVICES, ANY CLAIMS |
mbedakhela | 0:92f5363c7790 | 43 | * BY THIRD PARTIES (INCLUDING BUT NOT LIMITED TO ANY DEFENSE |
mbedakhela | 0:92f5363c7790 | 44 | * THEREOF), ANY CLAIMS FOR INDEMNITY OR CONTRIBUTION, OR OTHER |
mbedakhela | 0:92f5363c7790 | 45 | * SIMILAR COSTS, WHETHER ASSERTED ON THE BASIS OF CONTRACT, TORT |
mbedakhela | 0:92f5363c7790 | 46 | * (INCLUDING NEGLIGENCE), BREACH OF WARRANTY, OR OTHERWISE. |
mbedakhela | 0:92f5363c7790 | 47 | * |
mbedakhela | 0:92f5363c7790 | 48 | **************************************************************************/ |
mbedakhela | 0:92f5363c7790 | 49 | #ifndef MBED_THINGSPEAK_H |
mbedakhela | 0:92f5363c7790 | 50 | #define MBED_THINGSPEAK_H |
mbedakhela | 0:92f5363c7790 | 51 | |
mbedakhela | 0:92f5363c7790 | 52 | #define TRUE 1 |
mbedakhela | 0:92f5363c7790 | 53 | #define FALSE 0 |
mbedakhela | 0:92f5363c7790 | 54 | #define IPThingSpeak "184.106.153.149" |
mbedakhela | 0:92f5363c7790 | 55 | |
mbedakhela | 0:92f5363c7790 | 56 | class THINGSPEAK{ |
mbedakhela | 0:92f5363c7790 | 57 | public: |
mbedakhela | 0:92f5363c7790 | 58 | int wfTHINGSPEAK(char* writeapikey, float* value, int nvalue); |
mbedakhela | 0:92f5363c7790 | 59 | int wiTHINGSPEAK(char* writeapikey, int* value, int nvalue); |
mbedakhela | 0:92f5363c7790 | 60 | int thingHTTP(char* apikey, char* data); |
mbedakhela | 0:92f5363c7790 | 61 | int thingTWEET(char* apikey, char* message); |
mbedakhela | 0:92f5363c7790 | 62 | |
mbedakhela | 0:92f5363c7790 | 63 | private: |
mbedakhela | 0:92f5363c7790 | 64 | }; |
mbedakhela | 0:92f5363c7790 | 65 | #endif /*#define MBED_THINGSPEAK_H*/ |