User Manual
AdafruitAIO
AdafruitAIO is a special class the inherits from AdafruitMQTT (described earlier in this learning guide). It takes the
core features from AdafruitMQTT and adds some helper functions that make working with Adafruit
IO (https://adafru.it/fsU) easier.
Constructor
Parameters:
username: The username associated with your Adafruit IO account (normally visible here (https://adafru.it/dyy)).
password: The Adafruit IO key associated with your account. This is available by logging into Adafruit IO and
clicking the yellow 'key' icon labelled 'Your secret AIO key'.
Functions
In addition to the functions defined in the AdafruitMQTT base class, The following functions are included as part of
AdafruitAIO:
Connecting
The following functions are available to connect to the Adafruit IO server:
bool connect (bool cleanSession = true, uint16_t keepalive_sec =
If you're unfamiliar with Adafruit IO have a look at our introductory learning guide here:
https://learn.adafruit.com/adafruit-io
AdafruitAIO(const char* username, const char* password)
By default AdafruitAIO will generate a random 10..23 character string for the ClientID. If required you can
override the default value via the .clientID function if it is called BEFORE the .connect or .connectSSL
functions.
bool connect ( bool cleanSession = true,
uint16_t keepalive_sec = MQTT_KEEPALIVE_DEFAULT )
bool connectSSL ( bool cleanSession = true,
uint16_t keepalive_sec = MQTT_KEEPALIVE_DEFAULT )
bool updateFeed ( const char* feed,
UTF8String message,
uint8_t qos=MQTT_QOS_AT_MOST_ONCE,
bool retain=true )
bool followFeed ( const char* feed,
uint8_t qos,
messageHandler_t mh )
bool unfollowFeed ( const char* feed )
© Adafruit Industries https://learn.adafruit.com/introducing-the-adafruit-wiced-feather-wifi Page 130 of 202










