Hi there,
I am having an issue when sending variables to Ubidots via HTTP and/or TCP, this is with the latest release of v1.1.0 .
Similar as mentioned here by ScruffRPreformatted text
The system which consist of 5 Xenons and 1 Boron (2G/3G) is working fine with the Particle Console, publishing the information requested.
My problem is that as soon as I get the information from the Xenons, and try to add the variables to Ubidots, then it crashes with a hard_fault Panic (SOS+1).
I have spent the last 3 days trying to figure out a way to solve the problem, but I can’t find a way to solve this issue. Does anyone else have the same problem ?
I mean, if everything is working fine with the Particle Console, I don’t see why it can’t be passed to the Ubidots variables.
Please find below the code that is failing.
void SendUbidots() {
Particle.publish("Ubidots", "Sending Info Ubidots", PRIVATE);
if(mensaje == 0){
const char * device_type = "device"; // Edit here your device type label
char * device_setup = (char *) malloc(sizeof(char) * 30);
sprintf(device_setup, "%s/?type=%s", (const char*)device, device_type);
ubidots1.add("x", x_axis);
ubidots1.add("y", y_axis);
ubidots1.add("z", z_axis);
ubidots1.add("volts", voltage);
ubidots1.add("temp", temp);
ubidots1.add("msg", mensaje);
ubidots1.send(device_setup);
}
else if(mensaje == 1){
ubidots.add("volts", voltage);
ubidots.add("temp", temp);
ubidots.add("msg", mensaje);
ubidots.send((const char*)device);
}
}