User Manual

Returns: 'True' (1) if the follow operation was successful, otherwise 'false' (0).
bool unfollowFeed ( const char* feed )
Unfollows (or 'unsubscribes' in MQTT terminology) to the specified feed.
Parameters:
feed: The feed to update, not including the 'username/feeds/' prefix. So to work with 'username/feeds/onoff' you
should simply supply 'onoff' as the feedname.
Returns: 'True' (1) if the operation was successful, otherwise 'false' (0).
Example
The following example show how you can use the AdafruitAIO class to communicate with the Adafruit IO servers:
/**************************************************************************/
/*!
@brief 'follow' event callback handler
@param message The new value associated with this feed
@note 'message' is a UTF8String (byte array), which means
it is not null-terminated like C-style strings. You can
access its data and len using .data & .len, although there is
also a Serial.print override to handle UTF8String data types.
*/
/**************************************************************************/
void feed_callback(UTF8String message)
{
// Print message
Serial.println(message);
}
/*********************************************************************
This is an example for our Feather WIFI modules
Pick one up today in the adafruit shop!
Adafruit invests time and resources providing this open source code,
please support Adafruit and open-source hardware by purchasing
products from Adafruit!
MIT license, check LICENSE for more information
All text above, and the splash screen below must be included in
any redistribution
*********************************************************************/
#include <adafruit_feather.h>
#include <adafruit_mqtt.h>
#include "certificate_mosquitto.h"
/* This sketch demonstrates subscribe/unsubscribe activity with
* callbacks.
*
© Adafruit Industries https://learn.adafruit.com/introducing-the-adafruit-wiced-feather-wifi Page 133 of 202