I have a project regarding health monitoring, I used NodeMCU esp8266 device and ad8232 for ecg and also max30102 for spo2 and bpmI wanted to display these three variables on ubidots using wifi but the platform says there is no information “no found information” , If you have only one variable, ecg for example, the platform responds and displays the chart. But it does not respond if I want to work with the three variables. please help if the error is in the code. this is the code for
What I have tried:
declare variables:
<code>
#define DEVICE_LABEL "monitoring" // Put the device label
#define VARIABLE_LABEL_1 "ecgmoy" // Put the variable label
#define VARIABLE_LABEL_2 "spo2" // Put the variable label
#define VARIABLE_LABEL_3 "heartRate" // Put the variable label</code>
and for send and display :
<code> dtostrf(ecgmoy, 4, 2, str_val_1);
dtostrf(spo2, 4, 2, str_val_2);
dtostrf(heartRate, 4, 2, str_val_3);
sprintf(topic, "%s", "");
sprintf(topic, "%s%s", "/v1.6/devices/", DEVICE_LABEL);
sprintf(payload, "%s", "");
sprintf(payload, "{\"%s\":", VARIABLE_LABEL_1);
sprintf(payload, "%s {\"value\": %s}", payload, str_val_1);
sprintf(payload, "{\"%s\":", VARIABLE_LABEL_2);
sprintf(payload, "%s {\"value\": %s}", payload, str_val_2);
sprintf(payload, "%s, \"%s\":", payload, VARIABLE_LABEL_3);
sprintf(payload, "%s {\"value\": %s}", payload, str_val_3);
sprintf(payload, "%s}", payload);
Serial.println("Publishing data to Ubidots Cloud");
client.publish(topic, payload);
client.loop();
delay(10);
}</code>
please help !