inconsistent data readings from thingspeak - thingspeak library + arduino +esp8266 | ESP8266 Wi-Fi Module | 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
inconsistent data readings from thingspeak - thingspeak library + arduino +esp8266
Avatar
oded
New Member
Forum Posts: 3
sp_UserOfflineSmall Offline
1
August 8, 2016 - 4:31 am
sp_Permalink sp_Print

hi all.

 i try this forum since i had no success in the arduino thinspeak forum.

sorry for double posting - !!

 

i try to read last values of 3 field set  of thhingspeak channel.

like that:-

after setting up client with these libraries

#include <WiFiEsp.h>
#include <WiFiEspClient.h>
#include <WiFiEspServer.h>
#include <WiFiEspUdp.h>

#include <ThingSpeak.h> ////<<<<<<<<<<<<<<

etc.

etc.

 

void loop() {

int field1 = ThingSpeak.readIntField(141045,1);
Serial.println();
delay(1000);
Serial.print("field 1 is: ");
Serial.print(field1);
Serial.println();
int field2 = ThingSpeak.readIntField(141045,2);
Serial.println();
delay(10000);
Serial.print("field 2 is: ");
Serial.print(field2);
Serial.println();
int field3 = ThingSpeak.readIntField(141045,3);
Serial.println();
delay(10000);
Serial.print("field 3 is: ");
Serial.println(field3);
Serial.println();

delay(10000); // Note that the weather station only updates once a minute

;};

 

PROBLEM:

I set the data to be   600 , 600,600 

i get unstable readings (of same line wihch i try to read for testing purposes over the loop),

as follows  over the arduino  mega serial terminal 

 

field 1 is: 0
[WiFiEsp] Connecting to api.thingspeak.com
[WiFiEsp] TIMEOUT: 605
[WiFiEsp] Disconnecting 0

field 2 is: 0
[WiFiEsp] Connecting to api.thingspeak.com

field 3 is: 600 

[WiFiEsp] Connecting to api.thingspeak.com

field 1 is: 600
[WiFiEsp] Connecting to api.thingspeak.com
[WiFiEsp] TIMEOUT: 605
[WiFiEsp] Disconnecting 0

field 2 is: 0
[WiFiEsp] Connecting to api.thingspeak.com

field 3 is: 600

[WiFiEsp] Connecting to api.thingspeak.com

field 1 is: 600
[WiFiEsp] Connecting to api.thingspeak.com
[WiFiEsp] TIMEOUT: 607
[WiFiEsp] Disconnecting 0

field 2 is: 0
[WiFiEsp] Connecting to api.thingspeak.com

field 3 is: 600

[WiFiEsp] Connecting to api.thingspeak.com

field 1 is: 600
[WiFiEsp] Connecting to api.thingspeak.com
[WiFiEsp] TIMEOUT: 605
[WiFiEsp] Disconnecting 0

field 2 is: 0
[WiFiEsp] Connecting to api.thingspeak.com

field 3 is: 600

 

any body can explain  whats wrong here ?

 

is it low memory of arduino as one suggested  somewhere  ?

 

wifi is strong , and all results come ok over http terminal .

 

thanks  

Oded,

Avatar
Vinod

Forum Posts: 183
sp_UserOfflineSmall Offline
2
August 8, 2016 - 9:48 pm
sp_Permalink sp_Print sp_EditHistory

Is your device having a brownout?

Frequently the power consumption of the device will momentarily increase when it needs to transmit data over WiFi. If the power source is not capable of supplying the required power, a brownout may occur. I've had this happen to me with several ESP8266 devices.

Some things to try:

  1. Connect your device using an ethernet cable (if that is an option) and power it by external power (as opposed to battery power) and see if it reliably retrieves data
  2. If (1) works, then power it by new battery/freshly charged battery and ensure it works reliably
  3. If (2) works, then switch to wifi at a spot that has strong Wifi signal and ensure it works reliably 
  4. If (3) works, deploy device in field
Forum Timezone: America/New_York

Most Users Ever Online: 114

Currently Online: jacktheripper125
20 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:

Nsneilotof

angieus2

goldiepw11

BinanceoSt

gnarender123@gmail.com

edenderest

Forum Stats:

Groups: 4

Forums: 17

Topics: 1313

Posts: 4565

 

Member Stats:

Guest Posters: 1

Members: 5703

Moderators: 0

Admins: 2

Administrators: Hans, lee