Encountering an issue with your Adafruit IO Arduino Project?
If you're having an issue compiling, connecting, or troubleshooting your project, check this page first.
Don't see your issue? Post up on the Adafruit IO Forum with your issue.
I encounter the following error when compiling my sketch:
fatal error: Adafruit_MQTT.h: No such file or directory,
#include "Adafruit_MQTT.h"
The Adafruit IO Arduino library is dependent on our Adafruit IO MQTT Library.
To resolve this error, from the Arduino IDE, navigate to the Manage Libraries... option in the Sketch -> Include Library menu.
To resolve this error, from the Arduino IDE, navigate to the Manage Libraries... option in the Sketch -> Include Library menu.
Your board is not connecting to Adafruit IO, but why? Let's find out:
First, check in config.h
that you have the correct IO_USERNAME
, IO_KEY
, WIFI_SSID
, and WIFI_PASS
are set correctly.
Next, we're going to modify the while loop which waits for an IO connection in your sketch. Change the line in the status check loop from Serial.println(.);
to Serial.println(io.statusText());
// wait for a connection
while(io.status() < AIO_CONNECTED) {
Serial.println(io.statusText());
delay(500);
}
Verify and re-upload the sketch. If you're receiving a Network disconnected error message, the board is not able to talk to the internet. Re-check your hardware, connections, and router settings.
If it's still not showing Adafruit IO connected, check the IO status on the Adafruit Status page to make sure the service is online.
Possibly - you can check IO status on the Adafruit Status page.
There's a monitor page built-into Adafruit IO which provides a live view of incoming data and error messages. Keep this page open while you send data to your Adafruit IO devices to monitor data and errors.
Text editor powered by tinymce.