Hi There
I got started to use context variable.
I very exited about it and I am wondering how you should measure the dots consume .
Assume that I am sending 113 characters( see below) including the keys , in this case for particle photon, for example:
Thank for your answer
Back to values with context, I am able to send just 1 value int hat way.
As soon I trying to send second value the context for the first value does not come up
and only is showed the second value’s context.
Thank you for some help
Please see the attached code:
****************************************/
void setup() {
Serial.begin(115200);
//ubidots.setDebug(true); //Uncomment this line for printing debug messages
}
void loop() {
float value1 = 1;
float value2 = 1;
char context[250];
sprintf(context, "MotorStatus=\Motor: Low speed\$Whether=\Whether:Cloudy\$Temperature=\Temperature:Low\$Visibility=\Visibiliy:Normal\"");
sprintf(context, "Diagnostic1=\ bad belt\"");
ubidots.add("Data0", value1, context);
ubidots.add("Data2", value2, context);
bool bufferSent = false;
if(ubidots.isDirty()){ // There are stored values in buffer
bufferSent = ubidots.sendAll();
}
if(bufferSent){
// Do something if values were sent properly
Serial.println("Values sent by the device");
}
delay(20000);
}