0

DiscoBot 1.0.0 - Feather ESP8266 Plus the Feather Stepper mo
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

DiscoBot 1.0.0 - Feather ESP8266 Plus the Feather Stepper mo

by hepaestus on Fri Dec 22, 2017 4:10 pm

Having an issue with AIO and Suscribing to Feeds.

Please see my code on github:
https://github.com/hepaestus/discobot/b ... scoBot.ino

I have created all the requisite feeds in AIO and ONE(connection) of them works when publishing from the robot to AIO. Its the other Subscription feeds that aren't working.

DiscoBot is the project from Adafruit: https://learn.adafruit.com/build-an-esp ... troduction

hepaestus
 
Posts: 18
Joined: Sat May 07, 2016 6:54 am

Re: DiscoBot 1.0.0 - Feather ESP8266 Plus the Feather Steppe

by adafruit_support_mike on Fri Dec 22, 2017 5:19 pm

[moved to the adafruit.io forum]

adafruit_support_mike
 
Posts: 53119
Joined: Thu Feb 11, 2010 2:51 pm

Re: DiscoBot 1.0.0 - Feather ESP8266 Plus the Feather Steppe

by hepaestus on Wed Dec 27, 2017 10:25 am

Anybody???? Anything??? :(

hepaestus
 
Posts: 18
Joined: Sat May 07, 2016 6:54 am

Re: DiscoBot 1.0.0 - Feather ESP8266 Plus the Feather Steppe

by hepaestus on Wed Dec 27, 2017 2:34 pm

Here is the code that is supposed to listen for the subscriptions it doe not seem to pick up anything from AIO:

Code: Select all | TOGGLE FULL SIZE
void loop() {
  Serial.println("--- Start Loop ---");
 
  MQTT_connect();

  // this is our 'wait for incoming subscription packets' busy subloop
  // try to spend your time here

  Adafruit_MQTT_Subscribe *subscription;
  while ((subscription = mqtt.readSubscription(5000))) {
    Serial.println(" Subscribing... ");
    if (subscription == &forward) {
      Serial.print(F("Got: "));
      Serial.println((char *)forward.lastread);
      r_forward();
    }


Does anyone see any issues?

hepaestus
 
Posts: 18
Joined: Sat May 07, 2016 6:54 am

Re: DiscoBot 1.0.0 - Feather ESP8266 Plus the Feather Steppe

by abachman on Fri Dec 29, 2017 2:33 pm

Hi hepaestus,


I've put together an example sketch with two feeds working here: https://gist.github.com/abachman/14e73bc4f1e1aa31dddb23ab1d9c62ae, though it's based on the WICED Feather, so some of the setup code is slightly different. It's pretty much the same as yours, though, Adafruit_MQTT_Library example code with minor updates.

I'm going to put one together for the ESP8266 to push the limits a bit, but I suspect you may be hitting a subscription limit for the MQTT library. Will your sketch work if you only subscribe to one feed? Two, three, etc.? Or is it not working ever, for any number of feeds?

Is your "a-connection" feed producing the feedback you expect?


- adam

abachman
 
Posts: 230
Joined: Mon Feb 01, 2010 12:48 pm

Re: DiscoBot 1.0.0 - Feather ESP8266 Plus the Feather Steppe

by hepaestus on Thu Jan 04, 2018 9:30 am

I got it to work!

I am having an issue where I have too much data throughput on AIO. Thats the only issue now.

I will post my code on github

Thanks for your help!

hepaestus
 
Posts: 18
Joined: Sat May 07, 2016 6:54 am

Please be positive and constructive with your questions and comments.