marko puric / ThingSpeakEthernet

Dependents:   PMS5003 PMS5003

Embed: (wiki syntax)

« Back to documentation index

ThingSpeak Class Reference

ThingSpeak Class Reference

Class for sending data to ThingSpeak over ethernet, Class is using old mbed library revision and SensorsThingSpeak from https://developer.mbed.org/teams/TVZ-Mechatronics-Team/code/SensorsThingSpeak/ Example: More...

#include <ThingSpeak.h>

Public Member Functions

 ThingSpeak (char *)
 Write api key provided from ThingSpek channel.
void connect ()
 Establishing ethernet connection until connected.
float pull (long int, int)
 Funkcion for pulling data from ThingSpeak.
void setField (float field, int i)
 Setting values to the field, they should be set in order.

Detailed Description

Class for sending data to ThingSpeak over ethernet, Class is using old mbed library revision and SensorsThingSpeak from https://developer.mbed.org/teams/TVZ-Mechatronics-Team/code/SensorsThingSpeak/ Example:

 #include "mbed.h"
 #include "ThingSpeak.h"

 ThingSpeak thingSpeak("XXXXXXXXXXXXXXXX");

 int main() {
     int i = 1;
     flot value = 3.14;
     thingSpeak.connect();
     thingSpeak.setField(value,i)
     thingSpeak.putUp();
 }

Definition at line 27 of file ThingSpeak.h.


Constructor & Destructor Documentation

ThingSpeak ( char *  Key )

Write api key provided from ThingSpek channel.

Parameters:
write api key provided from ThingSpeak channel.

Definition at line 8 of file ThingSpeak.cpp.


Member Function Documentation

void connect (  )

Establishing ethernet connection until connected.

Definition at line 30 of file ThingSpeak.cpp.

float pull ( long int  readKey,
int  field 
)

Funkcion for pulling data from ThingSpeak.

Parameters:
readKeyChannel feed number
Fieldnumber.

Definition at line 15 of file ThingSpeak.cpp.

void setField ( float  field,
int  i 
)

Setting values to the field, they should be set in order.

It's not required to set them all (example: you can set 1, 2, 3 or 1, 3)

Parameters:
Fieldvalue to store on.
inumber of a field.

Definition at line 40 of file ThingSpeak.cpp.