Black Lives Matter - Action and Equality. ... Adafruit joins the Stop Hate for Profit campaign.
0

Feed send failures
Moderators: adafruit_support_bill, adafruit

Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
Please be positive and constructive with your questions and comments.

Feed send failures

by eehite on Mon Feb 29, 2016 8:02 pm

Evening all,

I have just started playing with the Adafruit REST libraries, and have so far been unable to get any operations to work.

Code: Select all | TOGGLE FULL SIZE
#include <SPI.h>
#include <Ethernet2.h>

#include "Adafruit_IO_Client.h"

#define AIO_KEY  "...my key is here..."

byte mac[] = { 0x90, 0xA2, 0xDA, 0x10, 0x30, 0xD1 };

EthernetClient client;

Adafruit_IO_Client aio = Adafruit_IO_Client(client, AIO_KEY);
Adafruit_IO_Feed testFeed = aio.getFeed("test");

int value;

void setup()
{
  Serial.begin(9600);

  if (Ethernet.begin(mac) == 0)
  {
    Serial.println(F("Ethernet Connection Failed"));
  }
  Serial.println(Ethernet.localIP());

  aio.begin();
}

void loop()
{
  for (int i = 0; i < 100; i++)
  {
    if (testFeed.send(value))
      Serial.println("sent value");
    else
      Serial.println("send failed");
  }
}


Am I implementing this correctly? The code gets an IP just fine, but all I ever get is the send failure message and the feed is never modified.

I'm running this on an Uno with an Ethernet shield.

Thanks for any thoughts!

eehite
 
Posts: 1
Joined: Mon Feb 29, 2016 2:49 pm

Re: Feed send failures

by adafruit2 on Mon Feb 29, 2016 10:16 pm

try adafruit_mqtt and the Ethernet example
https://github.com/adafruit/Adafruit_MQ ... hernet.ino

adafruit2
Site Admin
 
Posts: 19217
Joined: Fri Mar 11, 2005 7:36 pm

Re: Feed send failures

by play2liv on Sat Mar 05, 2016 10:42 pm

Hi what kind of project are you working on? What kind of data are you trying see on IO.adafruit? Did you ever get it to work?

play2liv
 
Posts: 11
Joined: Sat Jan 24, 2015 3:23 am

Please be positive and constructive with your questions and comments.