I'm working from the adafruitio_02_pubsub example, using an Airlift WiFi shield on an Arduino UNO R3. The basic sketch works, posting the counter value to a dashboard gauge through the "counter" feed. I am trying various modifications.
First, I added a pushbutton for updating the counter. That works as long as I print the state of the button (killing time?) at lines 105-107. Otherwise, the program becomes unresponsive after the first pass through loop().
Simplifying, I removed the counter feed and replaced it with a feed from the button state to an indicator light widget on the dashboard. This works fine, with the print statements at lines 105-107, but it also hangs up without those statements. This is the iteration I have attached.
Finally, putting the counter feed constructor back in (line 50), alongside the button feed, but keeping the remaining references to counter commented out, the program hangs immediately after upload. I don't even get the intro message at line 64.
Grateful for any help figuring this out. Thanks!
Two feeds, program hangs
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.
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
- ewhansen
- Posts: 33
- Joined: Tue Feb 12, 2019 3:18 pm
Two feeds, program hangs
- Attachments
-
[The extension ino has been deactivated and can no longer be displayed.]
- brubell
- Learn User Page
- Posts: 2010
- Joined: Fri Jul 17, 2015 10:33 pm
Re: Two feeds, program hangs
Could you copy and paste the loop in
Code: Select all
tags instead of attaching it. I'll take a look?
Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.