This library provides data update method to Fastsensing.

Dependents:   SCP1000_Fastsensing

Embed: (wiki syntax)

« Back to documentation index

Fastsensing Class Reference

Fastsensing Class Reference

Fastsensing Data Update class. More...

#include <Fastsensing.h>

Public Member Functions

int updateData (char *deviceId, char *channelId, double data, int display)
 Only one data update.
int updateDataAll (char *deviceId, char *channelId[3], float data[3], int display)
 Only one data update.

Detailed Description

Fastsensing Data Update class.

You can update data to your Fastsensing account used this class. This Liberary is tested on mbedOS 5.3.

Example:

 #include "mbed.h"
 #include "Fastsensing.h"
 
 Fastsensing fast;
 AnalogIn illu(p20);
 DigitalOut myled(LED1);
 
 int main()
 {
  float lx = illu * 3.3 / 3 * 1000;
  printf("lx : %f\n", lx);
  for(int i = 0; i < 5; i++) {
     fast.updateData("UIYCOQAATQAO5AF7", channel[0], lx,1 );
     wait(5.0);
  }
    while(1) {
      myled = 1;
      wait(0.5);
      myled = 0;
      wait(0.5);
  }
 }

Definition at line 60 of file Fastsensing.h.


Member Function Documentation

int updateData ( char *  deviceId,
char *  channelId,
double  data,
int  display 
)

Only one data update.

Parameters:
*deviceIdIt is issued your dashboard on fastsening. Device ID length is 16 characters.
*channelIdIt is issued your dashboard on fastsensing. Channel ID length is 8characters.
dataIt is the data you want to update.
display1 is display your sent data and recieve data. 0 is not.
Returns:
0 on success, -1 on deviceId length error, -2 on channelId length error

Definition at line 27 of file Fastsensing.cpp.

int updateDataAll ( char *  deviceId,
char *  channelId[3],
float  data[3],
int  display 
)

Only one data update.

Parameters:
*deviceIdIt is issued your dashboard on fastsening. Device ID length is 16 characters.
*channelId[3]These are issued your dashboard on fastsensing. Channel ID length is 8characters.
data[3]These are the data you want to update.
display1 is display your sent data and recieve data. 0 is not.
Returns:
0 on success, -1 on deviceId length error, -2 on channelId length error

Definition at line 85 of file Fastsensing.cpp.