No description
Find a file
2016-09-02 11:18:00 -04:00
.github Add GitHub issue template 2016-05-27 13:45:55 -07:00
.tests/AdafruitIO_Data fix tests on M0 2016-08-31 12:40:21 -04:00
examples add analog out example 2016-08-15 16:59:44 -04:00
.gitignore add gitignore 2016-07-19 16:00:56 -04:00
AdafruitIO.cpp add adafruit message to headers 2016-08-10 11:18:13 -04:00
AdafruitIO.h require v0.16.0 or higher of mqtt lib 2016-08-10 11:26:19 -04:00
AdafruitIO_Data.cpp make sure data value exists before type conversion 2016-08-15 16:56:59 -04:00
AdafruitIO_Data.h add toPinLevel to data 2016-08-12 17:07:53 -04:00
AdafruitIO_Definitions.h add adafruit message to headers 2016-08-10 11:18:13 -04:00
AdafruitIO_ESP8266.cpp add adafruit message to headers 2016-08-10 11:18:13 -04:00
AdafruitIO_ESP8266.h add adafruit message to headers 2016-08-10 11:18:13 -04:00
AdafruitIO_Ethernet.h fix ethernet include issue 2016-08-12 14:00:52 -04:00
AdafruitIO_Feed.cpp make feed data a public property of feed 2016-08-12 17:07:30 -04:00
AdafruitIO_Feed.h make feed data a public property of feed 2016-08-12 17:07:30 -04:00
AdafruitIO_FONA.h move fona logic to .h 2016-08-12 14:11:44 -04:00
AdafruitIO_MKR1000.cpp fix mkr1000 ifdef 2016-08-11 17:10:56 -04:00
AdafruitIO_MKR1000.h fix mkr1000 ifdef 2016-08-11 17:10:56 -04:00
AdafruitIO_WICED.cpp add adafruit message to headers 2016-08-10 11:18:13 -04:00
AdafruitIO_WICED.h add adafruit message to headers 2016-08-10 11:18:13 -04:00
AdafruitIO_WICED_SSL.h add adafruit message to headers 2016-08-10 11:18:13 -04:00
AdafruitIO_WiFi.h fix mkr1000 ifdef 2016-08-11 17:10:56 -04:00
AdafruitIO_WINC1500.cpp fix mkr1000 ifdef 2016-08-11 17:10:56 -04:00
AdafruitIO_WINC1500.h fix mkr1000 ifdef 2016-08-11 17:10:56 -04:00
Jenkinsfile add mkr1000 to jenkins 2016-09-02 11:18:00 -04:00
library.properties bump to 2.1.1 2016-08-15 17:15:24 -04:00
LICENSE remove old REST classes and examples 2016-07-19 15:24:08 -04:00
README.md Update README.md 2016-08-23 13:05:46 -04:00

Adafruit IO Arduino Library Build Status

This library provides a simple device independent interface for interacting with Adafruit IO using Arduino. It allows you to switch beween WiFi (ESP8266, M0 WINC1500, & WICED), Cellular (32u4 FONA), and Ethernet (Ethernet FeatherWing) with only a two line change in your sketch.

Dependencies

This library requires the latest version of the Arduino IDE (tested with v1.6.10).

Adafruit Feather HUZZAH ESP8266 & Adafruit HUZZAH ESP8266 Breakout

Adafruit Feather M0 WiFi with ATWINC1500

You will also need to add the SSL certificate for io.adafruit.com using the guide on the Adafruit Learning System.

Adafruit WICED Feather WiFi

Adafruit Feather 32u4 FONA

Adafruit Ethernet FeatherWing

The Ethernet FeatherWing will also require a 32u4, M0, or ESP8266 based Feather. Any Arduino cores required by the host Feather board will also be required.

Usage

The included examples sketches will walk you through all of the features of the library. They can be used on all platforms, but they default to WiFi. To change between platforms, you will need to change two lines of code in the config.h tab of the example. It is recommended that you start with one of the Adafruit WiFi feathers before moving on to cellular or ethernet.

For all examples, you will need to set IO_USERNAME and IO_KEY in the config.h tab.

The following sections demonstrate how to switch between WiFi, cellular, and ethernet.

WiFi (ESP8266, M0 WINC1500, WICED)

If you are using the included examples, you do not need to change anything for the Adafruit WiFi Feathers. All WiFi based Feathers (ESP8266, M0 WiFi, WICED) will work with the examples out of the box.

You will need to add your WiFi information to the WIFI_SSID and WIFI_PASS defines in the config.h tab.

Cellular (32u4 FONA)

For FONA, you will only need to change from the default WiFi constructor to the FONA specific constructor in the config.h tab. The rest of the sketch remains the same.

You will need to comment out these WiFi lines in config.h:

#include "AdafruitIO_WiFi.h"
AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);

and uncomment the FONA lines in config.h:

#include "AdafruitIO_FONA.h"
AdafruitIO_FONA io(IO_USERNAME, IO_KEY);

If your carrier requires APN info, you can set it by adding a call to io.setAPN() after io.connect() in the setup() function of the sketch.

void setup() {

  // start the serial connection
  Serial.begin(115200);

  // connect to io.adafruit.com
  io.connect();

  io.setAPN(F("your_apn"), F("your_apn_user"), F("your_apn_pass"));

}

Ethernet (Ethernet FeatherWing)

For Ethernet, you will only need to change from the default WiFi constructor to the Ethernet specific constructor in the config.h tab. The rest of the sketch remains the same.

You will need to comment out these WiFi lines in config.h:

#include "AdafruitIO_WiFi.h"
AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);

and uncomment the Ethernet lines in config.h:

#include "AdafruitIO_Ethernet.h"
AdafruitIO_Ethernet io(IO_USERNAME, IO_KEY);

Compatibility

Last test with v2.0.0 on 08/10/2016.

Example ESP8266 M0 WINC1500 WICED FONA 32u4 Ethernet* MKR1000
00_publish ?
01_subscribe ?
02_pubsub ?
03_multiple_feeds ?
04_location ?
05_type_conversion ?
06_digital_in ? ?

*Ethernet FeatherWing tested with Feather M0 Basic Proto

License

Copyright (c) 2016 Adafruit Industries. Licensed under the MIT license.

Adafruit invests time and resources providing this open source code. Please support Adafruit and open-source hardware by purchasing products from Adafruit.