Error -301 with Arduino mega and shield W5100
I don't understand what the -301 error means when trying to write a field to ThingSpeak. I checked my key and my write ID is OK ... The same program on another Arduino Mega and shield W5100 (but on another channel) works well ... Does anyone have any idea what the meaning of this error code is to know in which direction to look! Thank you
code :
void thingspeak(float t, float h, float units, int lum, int TempInt){
ThingSpeak.setField(1, t);
ThingSpeak.setField(2, h);
ThingSpeak.setField(3, units);
ThingSpeak.setField(4, lum);
ThingSpeak.setField(5,TempInt);
ThingSpeak.setStatus("Update OK: ");
/* écriture des champs dans ThingSpeak */ int x = ThingSpeak.writeFields(myChannelNumber, myWriteAPIKey);
if(x == 200){
Serial.println(F("Update of ThingSpeak ok."));
} else err(6,x); // error handling
} // end of function thingspeak
7 Commenti
Tempo discendenteI have 2 different IP addresses and MAC addresses. (on each of my 2 Arduino) And the shield is well connected to the internet since before trying to update Thingspeak, my program sends me 2 emails (emailender libraries from Mischianti Renzo) which I receive very well ....
Thanks for the suggestion.
Since you mention 2 devices with the shield, one working and another not, have you looked at your router's config and can you see that two Arduinos are connected to it? My guess is that you have a MAC address collision and the second Arduino is not even connected to the internet.