Thingspeak library failure with returned Error codes! with cryptic meanings? | 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
Thingspeak library failure with returned Error codes! with cryptic meanings?
Avatar
PlStrss
New Member
Forum Posts: 1
sp_UserOfflineSmall Offline
1
May 22, 2016 - 5:40 pm
sp_Permalink sp_Print

EmbarassedI'm new here and trying to post to a new channel via the Arduino IDE and a NodeMcu 0.9 ESP8266 board. I can post direct from a browser and see the results OK BUT when I run some code via the 

#include <ThingSpeak.h>

library e.g. the lines below... 

ThingSpeak.setField(1, float(20.2));
ThingSpeak.setField(2, float(23.4));
int ExitCode = ThingSpeak.writeFields(MyTSChannelNumber, MyTSWriteAPIKey);
if (ExitCode == 200)
{
Serial.print (" 200=Success! ");
}
else
{
Serial.print (" 🙁 Thingspeak Error Code = "); Serial.print(ExitCode);
}

I get a -302 error code!  and of course no data is written. Otherwise I am quite close to getting something done.

This is a "#define ERR_UNEXPECTED_FAIL     -302    // Unexpected failure during write to ThingSpeak"

Can anyone help with demystifying the library exit code or see a problem in what I have done? How can I test things better. I get a -301 when I sever the connection which is what I would expect.

Paul

Forum Timezone: America/New_York

Most Users Ever Online: 114

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