Adafruit IO Arduino Library
|
Class for interfacing with an Adafruit FONA Ceullar Module. More...
#include <AdafruitIO_FONA.h>
Public Member Functions | |
AdafruitIO_FONA (const char *user, const char *key) | |
Initializes a new AdafruitIO_FONA instance. More... | |
void | setAPN (FONAFlashStringPtr apn, FONAFlashStringPtr username=0, FONAFlashStringPtr password=0) |
Sets Adafruit Fona APN name. More... | |
aio_status_t | networkStatus () |
Returns network connection status. More... | |
const char * | connectionType () |
Returns network module type. More... | |
Public Member Functions inherited from AdafruitIO | |
AdafruitIO (const char *user, const char *key) | |
Instantiate the AIO object. More... | |
virtual | ~AdafruitIO () |
Destructor to end the AIO object. | |
void | connect () |
Connects to AIO, setting up using parameters set when the class is instantiated. | |
void | wifi_disconnect () |
Disconnects from WiFi. | |
aio_status_t | run (uint16_t busywait_ms=0, bool fail_fast=false) |
Must be called frequently to keep AIO connections alive. When called with no arguments run() will try to repair MQTT and WiFi connections before returning. To avoid potentially long timeout delays, sketches can use the busywait_ms and fail_fast arguments to return an imperfect status quickly. The calling sketch will then need to respond appropriately to that status. More... | |
AdafruitIO_Feed * | feed (const char *name) |
Create a new AIO feed. More... | |
AdafruitIO_Feed * | feed (const char *name, const char *owner) |
Create a new AIO feed. More... | |
AdafruitIO_Group * | group (const char *name) |
Create a new AIO group. More... | |
AdafruitIO_Dashboard * | dashboard (const char *name) |
Create a new AIO dashboard. More... | |
AdafruitIO_Time * | time (aio_time_format_t format) |
Create a new AIO time. More... | |
const __FlashStringHelper * | statusText () |
Provide status explanation strings. More... | |
aio_status_t | status () |
Status check. More... | |
aio_status_t | mqttStatus (bool fail_fast=false) |
Returns MQTT connection status. More... | |
char * | boardID () |
Identify the board. More... | |
const char * | boardType () |
Identify the board type. More... | |
char * | version () |
Identify the software version. More... | |
char * | userAgent () |
Identify the user agent. More... | |
Protected Member Functions | |
void | _connect () |
Establishes a connection to Adafruit IO. | |
void | _disconnect () |
Disconnects from Adafruit IO and the cellular network. | |
Protected Attributes | |
uint16_t | _mqtt_port = 1883 |
SoftwareSerial * | _serial |
Adafruit_FONA * | _fona |
Protected Attributes inherited from AdafruitIO | |
aio_status_t | _status = AIO_IDLE |
uint32_t | _last_ping |
uint32_t | _last_mqtt_connect = 0 |
Adafruit_MQTT * | _mqtt |
HttpClient * | _http |
char | _version [10] |
const char * | _host = "io.adafruit.com" |
uint16_t | _mqtt_port = 8883 |
uint16_t | _mqtt_eth_port |
uint16_t | _http_port = 443 |
uint16_t | _packetread_timeout |
const char * | _username |
const char * | _key |
char * | _err_topic |
char * | _throttle_topic |
char * | _user_agent |
Adafruit_MQTT_Subscribe * | _err_sub |
Adafruit_MQTT_Subscribe * | _throttle_sub |
Class for interfacing with an Adafruit FONA Ceullar Module.
|
inline |
Initializes a new AdafruitIO_FONA instance.
user | GRPS APN username |
key | GPRS APN password |
|
inline |
Sets Adafruit Fona APN name.
apn | GPRS APN name. |
username | GPRS APN username. |
password | GRPS APN password. |
|
inlinevirtual |
Returns network connection status.
Implements AdafruitIO.
|
inlinevirtual |
|
protected |
Adafruit IO insecure MQTT port.
|
protected |
an instance of SoftwareSerial.
|
protected |
an instance of Adafruit_FONA.