I cannot upload data from my Arduino Mega with Ethernet Shiled to Cosm. I tried one of the tutorial examples (DatastreamUpload.ino
). I used the API key and feed ID that Cosm gave to me at the registration and changed the init()
function to use a static IP address as below:
byte mac[] = {0x90, 0xA2, 0xDA, 0x0D, 0xD3, 0x45 };
IPAddress ip(192,168,0, 110);
IPAddress gateway(192,168,0, 1);
IPAddress subnet(255, 255, 255, 0);
then:
Ethernet.begin(mac, ip, gateway, subnet);
Here is the output from serial monitor:
Read sensor value 452.00 Uploading it to Cosm cosmclient.put returned -1 Read sensor value 451.00 Uploading it to Cosm cosmclient.put returned -1 Read sensor value 378.00 Uploading it to Cosm cosmclient.put returned -3 Read sensor value 352.00 Uploading it to Cosm cosmclient.put returned -3
Does someone have a solution to this?