109Views5Replies

Author Options:

AdafruitIO.h not loading? Answered

I have been unable to get the AdfruitIO.h to load in my sketch. That being said, I followed NicatH1's suggestion in the comments to disregard it, and believe everything seems to work fine without it. Pushing button trigger lights up my LED, serial monitor shows button press, I see a spike on my Adafruit Dashboard, and I receive an email about activity on my Adafruit account. Seems like everything is in order, but my question is am I missing some type of functionality without it?

Discussions

0
bekathwia
bekathwia

Best Answer 2 years ago

Can you clarify what you mean by "unable"? What is the error? Do you have all three required libraries installed? Without more info, I can't diagnose the rest of your comment, since the proper libraries are required to run the code as written.

0
nlewkowitz
nlewkowitz

Answer 2 years ago

Thank you for your response, apologies for not clarifying. When I add the Adafruit IO to Arduino library to my sketch the text 'AdafruitIO.h' does not turn orange which suggests it is not being recognized, and yes, I have all 3 other libraries installed and their text turns orange after installed into the sketch. When I tried to upload the sketch - without 'Adafruit IO to Arduino' properly installed I received a very long error message. After reading some comments on this page, I tried deleting the '#include <AdafruitIO.h>' from the sketch. I was able to then upload the code and everything seems to be working - triggers are being received on my Adafruit Dashboard. If all the libraries are required to run the code as written, I'm curious why the sketch appears to be working without #include <AdafruitIO.h>. I hope this makes sense, and thank you for your time.

0
bekathwia
bekathwia

Answer 2 years ago

I am asking about the contents of that long error message. I do not know why it would still work properly, accept for that there is some redundancy built in to the IO library (AdafruitIO.h includes the MQTTT library file, for example, but it is also included separately in the Arduino sketch). Please post a screenshot of both your code and the error message, thanks!

0
nlewkowitz
nlewkowitz

Answer 2 years ago

I added back #include <AdafruitIO.h> into the code. I've attached a screenshot to show the library is in fact installed, however, the code does not turn orange. When I uploaded the code to my Huzzah to get a screenshot, however, I did not receive any error messages this time. With #include <AdafruitIO.h> everything seems to be working fine - still bothered as to why the text did not change color. I appreciate your help, and realize I'm not giving you much to diagnose the issue.

Screen Shot 2017-09-26 at 6.39.07 PM.pngScreen Shot 2017-09-26 at 6.28.41 PM.pngScreen Shot 2017-09-23 at 5.09.47 PM.png
0
Parkesdj
Parkesdj

1 year ago

I had the same problem with a NodeMCU the solution is on the Adafruit IO FAQ.
https://learn.adafruit.com/adafruit-io-basics-esp8266-arduino/adafruit-io-faq
Compiling my sketch returns an error:
error: return-statement with a value, in function returning 'void' [-fpermissive]
virtual void flush() { return iClient->flush(); };

Firmware Beta 2.5.0 for the ESP8266 breaks compatibility with ArduinoHttpClient(which is used by Adafruit IO). The Adafruit IO Arduino library is currently unsupported by this beta firmware. To get it working, we'll downgrade the firmware on the ESP8266 to a stable version.

Launch the Board Manager from Arduino by navigating to Tools -> Boards -> Board Manager. Type ESP8266 into the search bar. From the dropdown, select version 2.4.2

0
knova54
knova54

Answer 10 months ago

I had done what you suggest and that's not change the code color.
It's still black.
Is it matter or not for the IoT project for the next project?
Thanks for the advice