missing data points | Arduino | Forum

Avatar

Please consider registering
Guest

Search

— Forum Scope —






— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

Register Lost password?
sp_Feed sp_TopicIcon
missing data points
Avatar
BeeWare
New Member
Forum Posts: 2
sp_UserOfflineSmall Offline
1
February 23, 2017 - 4:09 pm
sp_Permalink sp_Print

I am using an arduino uno wifi to post 4 sensors to 1 channel, and It looks like I am missing data points. why am I missing data points?

Avatar
Vinod

Forum Posts: 183
sp_UserOfflineSmall Offline
2
February 23, 2017 - 7:41 pm
sp_Permalink sp_Print

Please post your code so someone can look into it to provide suggestion.

A few things to check in your code:

  • Are you updating your channel faster than the maximum update rate for your user type? Free user accounts can update a channel once every 15s, a paid ThingSpeak license enables you to update a channel every second.
  •  Are you updating one field at a time for a channel, rather than updating all fields in a single shot? If so, there is a very high likelihood that you are violating the above mentioned aspect
  • Have you tried connecting to a serial port from a computer and using serial.print() to print out the return code you get from ThingSpeak? That will usually give you a good idea of what is going on.
Avatar
BeeWare
New Member
Forum Posts: 2
sp_UserOfflineSmall Offline
3
February 25, 2017 - 10:23 am
sp_Permalink sp_Print

below is my loop code, so do i need to put a delay in between each of my uploads instead of 30 seconds t the end?

 

void loop()
{
dTemp.requestTemperatures();

String uri = "/update?api_key=";
uri += APIKEY;

uri += "&field1="; //populates field 1 on ThinkSpeak Website
uri += String(dTemp.getTempF(Probe01)); //gets temperature from probe 1

uri += "&field2="; //populates field 2 on ThinkSpeak Website
uri += String(dTemp.getTempF(Probe02)); //gets temperature from probe 2

uri += "&field3="; //populates field 3 on ThinkSpeak Website
uri += String(dTemp.getTempF(Probe03)); //gets temperature from probe 3

uri += "&field4="; //populates field 4 on ThinkSpeak Website
uri += String(scale.get_units()); // get weight on scale in lbs

Ciao.println("Send data on ThingSpeak Channel");

CiaoData data = Ciao.write(CONNECTOR, SERVER_ADDR, uri);

if (!data.isEmpty()){
Ciao.println( "State: " + String (data.get(1)) );
Ciao.println( "Response: " + String (data.get(2)) );
}
else{
Ciao.println("Write Error");
}

delay(30000); // 30 seconds delay

}

Avatar
Vinod

Forum Posts: 183
sp_UserOfflineSmall Offline
4
February 25, 2017 - 2:28 pm
sp_Permalink sp_Print

I'd recommend using the library rather than roll your own. 

Take a look at the tutorials here: http://community.thingspeak.com/tutorials/

Take a look at the examples in the library here: https://github.com/mathworks/thingspeak-arduino/tree/master/examples

Forum Timezone: America/New_York

Most Users Ever Online: 114

Currently Online:
21 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

rw950431: 252

Vinod: 164

cstapels: 96

piajola: 75

vespapierre: 63

Adarsh_Murthy: 59

Newest Members:

candacele1

WilliamBer

roxieob18

Metawatch

ozayagw

ubabeutiti

Forum Stats:

Groups: 4

Forums: 17

Topics: 1313

Posts: 4565

 

Member Stats:

Guest Posters: 1

Members: 5703

Moderators: 0

Admins: 2

Administrators: Hans, lee