I’m developing a device, arduino based, for upload a meteo data to ubidots platform. I have a question about a possibility to upload a bulk file with absolute time stamp. Does it possible to Write many entries to my channel, with a single http request in Ubidots Environment?
I use arduino uno and sim 900 ( Ubidots Arduino GPRS library).
Thank you very much.This is exatly that I wondering.
For Absolute timestamp i i mean a value that has a specific time of entry, different of the upload time, in ubidots personal dashboard.
I have another question about the code:
I use a specific library ubidots-arduino-gprs for connect my sim module to Arduino
I try to change this code but the upload don’t works appropiatly:
void loop() {
_ float value = 1;_
_ int timestamp;_
_ sprintf(timestamp, “1525635620”); //Sends latitude and longitude for watching position in a map_
_ client.add(VARIABLE_LABEL, value, timestamp); // Change for your variable name_
_ client.sendAll();_ }
the first part, is the same of Example UbidotsSaveValueWithContext;
In the loop of the code I can see that you have assigned the timestamp instead of the context as it’s mentioned in the comments of the code. Based on this, what do you desire to assign a context or timestamp?
Now, based on what you desire to sent you should follow the next points:
I looked at your second example and I wrote the following code (the first part is the same of my last example):
void loop (){
double value = 9999;
long unsigned timestamp;
char context[25];
sprintf(timestamp, “1525635620”); //Sends latitude and longitude for watching position in a map
client.add(VARIABLE_LABEL,value,NULL,timestamp); // Change for your variable name
client.sendAll();
}
Unfortunately the value isn’t loaded on my dashboard.
Greetings, the library uses a stream client to send data to the GPRS shield using the unique serial port of the Arduino Uno, said that, I do not think that the library gives issues with the port of the Arduino Mega as always as the default one remains to be of Arduino UNO. BTW, we have not tested this library with a Mega, so you will have to test it to know if it works properly.
Thank you for your clarification. I tryed to send values from arduino Mega to my Ubidots channel but unfortunately the sistem didn’t trasmit anything. I used the same sketch that i used with arduino Uno. A that time with uno everything was ok.
I ask you if can at this point, solve the problem changing t something in the GSM library or i have to think about at another solution?
I would advise you to create your own script based on the provided example by the SIM 900 Arduino library official TCP client example, at our new docs you can find several payload examples build in pure C out of the box that can serve to you as reference.