Quantcast
Channel: ThingSpeak IoT Community - Forum: Arduino
Viewing all articles
Browse latest Browse all 172

oded on thingspeak ThingSpeak.readIntField(,,) on arduino with esp8266 unstable

$
0
0

hi all.

 

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,


Viewing all articles
Browse latest Browse all 172

Trending Articles