Skip to content

Commit

Permalink
Merge pull request #84 from brentru/airlift-standalone
Browse files Browse the repository at this point in the history
Adding AirLift Compatibility for PyPortal and Metro M4 WiFi
  • Loading branch information
brentru committed Apr 29, 2019
2 parents 3c611fd + bc85d20 commit 5b560b3
Show file tree
Hide file tree
Showing 33 changed files with 595 additions and 176 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@
.piolibdeps
platformio.ini
.tests

# visual studio code
.vscode
1 change: 1 addition & 0 deletions examples/adafruitio_00_publish/.zero.test.skip
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

21 changes: 15 additions & 6 deletions examples/adafruitio_00_publish/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

// visit io.adafruit.com if you need to create an account,
// or if you need your Adafruit IO key.
#define IO_USERNAME "your_username"
#define IO_KEY "your_key"
#define IO_USERNAME "your_username"
#define IO_KEY "your_key"

/******************************* WIFI **************************************/

Expand All @@ -14,13 +14,23 @@
// - Feather M0 WiFi -> https://www.adafruit.com/products/3010
// - Feather WICED -> https://www.adafruit.com/products/3056

#define WIFI_SSID "your_ssid"
#define WIFI_PASS "your_pass"
#define WIFI_SSID "your_ssid"
#define WIFI_PASS "your_pass"

// comment out the following two lines if you are using fona or ethernet
#include "AdafruitIO_WiFi.h"
AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);

/******************************* AirLift **************************************/

// the AdafruitIO_AirLift client will work with the following boards:
// - Adafruit PyPortal -> https://www.adafruit.com/product/4116
// - Adafruit Metro M4 Express AirLift Lite -> https://www.adafruit.com/product/4000

// uncomment the following two lines for AirLift,
// and comment out the AdafruitIO_WiFi client in the WIFI section
// #include "AdafruitIO_AIRLIFT.h"
// AdafruitIO_AIRLIFT io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);

/******************************* FONA **************************************/

Expand All @@ -32,7 +42,6 @@ AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);
// #include "AdafruitIO_FONA.h"
// AdafruitIO_FONA io(IO_USERNAME, IO_KEY);


/**************************** ETHERNET ************************************/

// the AdafruitIO_Ethernet client will work with the following boards:
Expand All @@ -41,4 +50,4 @@ AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);
// uncomment the following two lines for ethernet,
// and comment out the AdafruitIO_WiFi client in the WIFI section
// #include "AdafruitIO_Ethernet.h"
// AdafruitIO_Ethernet io(IO_USERNAME, IO_KEY);
// AdafruitIO_Ethernet io(IO_USERNAME, IO_KEY);
21 changes: 15 additions & 6 deletions examples/adafruitio_01_subscribe/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

// visit io.adafruit.com if you need to create an account,
// or if you need your Adafruit IO key.
#define IO_USERNAME "your_username"
#define IO_KEY "your_key"
#define IO_USERNAME "your_username"
#define IO_KEY "your_key"

/******************************* WIFI **************************************/

Expand All @@ -14,13 +14,23 @@
// - Feather M0 WiFi -> https://www.adafruit.com/products/3010
// - Feather WICED -> https://www.adafruit.com/products/3056

#define WIFI_SSID "your_ssid"
#define WIFI_PASS "your_pass"
#define WIFI_SSID "your_ssid"
#define WIFI_PASS "your_pass"

// comment out the following two lines if you are using fona or ethernet
#include "AdafruitIO_WiFi.h"
AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);

/******************************* AirLift **************************************/

// the AdafruitIO_AirLift client will work with the following boards:
// - Adafruit PyPortal -> https://www.adafruit.com/product/4116
// - Adafruit Metro M4 Express AirLift Lite -> https://www.adafruit.com/product/4000

// uncomment the following two lines for AirLift,
// and comment out the AdafruitIO_WiFi client in the WIFI section
// #include "AdafruitIO_AIRLIFT.h"
// AdafruitIO_AIRLIFT io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);

/******************************* FONA **************************************/

Expand All @@ -32,7 +42,6 @@ AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);
// #include "AdafruitIO_FONA.h"
// AdafruitIO_FONA io(IO_USERNAME, IO_KEY);


/**************************** ETHERNET ************************************/

// the AdafruitIO_Ethernet client will work with the following boards:
Expand All @@ -41,4 +50,4 @@ AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);
// uncomment the following two lines for ethernet,
// and comment out the AdafruitIO_WiFi client in the WIFI section
// #include "AdafruitIO_Ethernet.h"
// AdafruitIO_Ethernet io(IO_USERNAME, IO_KEY);
// AdafruitIO_Ethernet io(IO_USERNAME, IO_KEY);
21 changes: 15 additions & 6 deletions examples/adafruitio_02_pubsub/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

// visit io.adafruit.com if you need to create an account,
// or if you need your Adafruit IO key.
#define IO_USERNAME "your_username"
#define IO_KEY "your_key"
#define IO_USERNAME "your_username"
#define IO_KEY "your_key"

/******************************* WIFI **************************************/

Expand All @@ -14,13 +14,23 @@
// - Feather M0 WiFi -> https://www.adafruit.com/products/3010
// - Feather WICED -> https://www.adafruit.com/products/3056

#define WIFI_SSID "your_ssid"
#define WIFI_PASS "your_pass"
#define WIFI_SSID "your_ssid"
#define WIFI_PASS "your_pass"

// comment out the following two lines if you are using fona or ethernet
#include "AdafruitIO_WiFi.h"
AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);

/******************************* AirLift **************************************/

// the AdafruitIO_AirLift client will work with the following boards:
// - Adafruit PyPortal -> https://www.adafruit.com/product/4116
// - Adafruit Metro M4 Express AirLift Lite -> https://www.adafruit.com/product/4000

// uncomment the following two lines for AirLift,
// and comment out the AdafruitIO_WiFi client in the WIFI section
// #include "AdafruitIO_AIRLIFT.h"
// AdafruitIO_AIRLIFT io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);

/******************************* FONA **************************************/

Expand All @@ -32,7 +42,6 @@ AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);
// #include "AdafruitIO_FONA.h"
// AdafruitIO_FONA io(IO_USERNAME, IO_KEY);


/**************************** ETHERNET ************************************/

// the AdafruitIO_Ethernet client will work with the following boards:
Expand All @@ -41,4 +50,4 @@ AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);
// uncomment the following two lines for ethernet,
// and comment out the AdafruitIO_WiFi client in the WIFI section
// #include "AdafruitIO_Ethernet.h"
// AdafruitIO_Ethernet io(IO_USERNAME, IO_KEY);
// AdafruitIO_Ethernet io(IO_USERNAME, IO_KEY);
21 changes: 15 additions & 6 deletions examples/adafruitio_03_multiple_feeds/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

// visit io.adafruit.com if you need to create an account,
// or if you need your Adafruit IO key.
#define IO_USERNAME "your_username"
#define IO_KEY "your_key"
#define IO_USERNAME "your_username"
#define IO_KEY "your_key"

/******************************* WIFI **************************************/

Expand All @@ -14,13 +14,23 @@
// - Feather M0 WiFi -> https://www.adafruit.com/products/3010
// - Feather WICED -> https://www.adafruit.com/products/3056

#define WIFI_SSID "your_ssid"
#define WIFI_PASS "your_pass"
#define WIFI_SSID "your_ssid"
#define WIFI_PASS "your_pass"

// comment out the following two lines if you are using fona or ethernet
#include "AdafruitIO_WiFi.h"
AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);

/******************************* AirLift **************************************/

// the AdafruitIO_AirLift client will work with the following boards:
// - Adafruit PyPortal -> https://www.adafruit.com/product/4116
// - Adafruit Metro M4 Express AirLift Lite -> https://www.adafruit.com/product/4000

// uncomment the following two lines for AirLift,
// and comment out the AdafruitIO_WiFi client in the WIFI section
// #include "AdafruitIO_AIRLIFT.h"
// AdafruitIO_AIRLIFT io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);

/******************************* FONA **************************************/

Expand All @@ -32,7 +42,6 @@ AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);
// #include "AdafruitIO_FONA.h"
// AdafruitIO_FONA io(IO_USERNAME, IO_KEY);


/**************************** ETHERNET ************************************/

// the AdafruitIO_Ethernet client will work with the following boards:
Expand All @@ -41,4 +50,4 @@ AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);
// uncomment the following two lines for ethernet,
// and comment out the AdafruitIO_WiFi client in the WIFI section
// #include "AdafruitIO_Ethernet.h"
// AdafruitIO_Ethernet io(IO_USERNAME, IO_KEY);
// AdafruitIO_Ethernet io(IO_USERNAME, IO_KEY);
21 changes: 15 additions & 6 deletions examples/adafruitio_04_location/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

// visit io.adafruit.com if you need to create an account,
// or if you need your Adafruit IO key.
#define IO_USERNAME "your_username"
#define IO_KEY "your_key"
#define IO_USERNAME "your_username"
#define IO_KEY "your_key"

/******************************* WIFI **************************************/

Expand All @@ -14,13 +14,23 @@
// - Feather M0 WiFi -> https://www.adafruit.com/products/3010
// - Feather WICED -> https://www.adafruit.com/products/3056

#define WIFI_SSID "your_ssid"
#define WIFI_PASS "your_pass"
#define WIFI_SSID "your_ssid"
#define WIFI_PASS "your_pass"

// comment out the following two lines if you are using fona or ethernet
#include "AdafruitIO_WiFi.h"
AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);

/******************************* AirLift **************************************/

// the AdafruitIO_AirLift client will work with the following boards:
// - Adafruit PyPortal -> https://www.adafruit.com/product/4116
// - Adafruit Metro M4 Express AirLift Lite -> https://www.adafruit.com/product/4000

// uncomment the following two lines for AirLift,
// and comment out the AdafruitIO_WiFi client in the WIFI section
// #include "AdafruitIO_AIRLIFT.h"
// AdafruitIO_AIRLIFT io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);

/******************************* FONA **************************************/

Expand All @@ -32,7 +42,6 @@ AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);
// #include "AdafruitIO_FONA.h"
// AdafruitIO_FONA io(IO_USERNAME, IO_KEY);


/**************************** ETHERNET ************************************/

// the AdafruitIO_Ethernet client will work with the following boards:
Expand All @@ -41,4 +50,4 @@ AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);
// uncomment the following two lines for ethernet,
// and comment out the AdafruitIO_WiFi client in the WIFI section
// #include "AdafruitIO_Ethernet.h"
// AdafruitIO_Ethernet io(IO_USERNAME, IO_KEY);
// AdafruitIO_Ethernet io(IO_USERNAME, IO_KEY);
21 changes: 15 additions & 6 deletions examples/adafruitio_05_type_conversion/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

// visit io.adafruit.com if you need to create an account,
// or if you need your Adafruit IO key.
#define IO_USERNAME "your_username"
#define IO_KEY "your_key"
#define IO_USERNAME "your_username"
#define IO_KEY "your_key"

/******************************* WIFI **************************************/

Expand All @@ -14,13 +14,23 @@
// - Feather M0 WiFi -> https://www.adafruit.com/products/3010
// - Feather WICED -> https://www.adafruit.com/products/3056

#define WIFI_SSID "your_ssid"
#define WIFI_PASS "your_pass"
#define WIFI_SSID "your_ssid"
#define WIFI_PASS "your_pass"

// comment out the following two lines if you are using fona or ethernet
#include "AdafruitIO_WiFi.h"
AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);

/******************************* AirLift **************************************/

// the AdafruitIO_AirLift client will work with the following boards:
// - Adafruit PyPortal -> https://www.adafruit.com/product/4116
// - Adafruit Metro M4 Express AirLift Lite -> https://www.adafruit.com/product/4000

// uncomment the following two lines for AirLift,
// and comment out the AdafruitIO_WiFi client in the WIFI section
// #include "AdafruitIO_AIRLIFT.h"
// AdafruitIO_AIRLIFT io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);

/******************************* FONA **************************************/

Expand All @@ -32,7 +42,6 @@ AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);
// #include "AdafruitIO_FONA.h"
// AdafruitIO_FONA io(IO_USERNAME, IO_KEY);


/**************************** ETHERNET ************************************/

// the AdafruitIO_Ethernet client will work with the following boards:
Expand All @@ -41,4 +50,4 @@ AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);
// uncomment the following two lines for ethernet,
// and comment out the AdafruitIO_WiFi client in the WIFI section
// #include "AdafruitIO_Ethernet.h"
// AdafruitIO_Ethernet io(IO_USERNAME, IO_KEY);
// AdafruitIO_Ethernet io(IO_USERNAME, IO_KEY);
21 changes: 15 additions & 6 deletions examples/adafruitio_06_digital_in/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

// visit io.adafruit.com if you need to create an account,
// or if you need your Adafruit IO key.
#define IO_USERNAME "your_username"
#define IO_KEY "your_key"
#define IO_USERNAME "your_username"
#define IO_KEY "your_key"

/******************************* WIFI **************************************/

Expand All @@ -14,13 +14,23 @@
// - Feather M0 WiFi -> https://www.adafruit.com/products/3010
// - Feather WICED -> https://www.adafruit.com/products/3056

#define WIFI_SSID "your_ssid"
#define WIFI_PASS "your_pass"
#define WIFI_SSID "your_ssid"
#define WIFI_PASS "your_pass"

// comment out the following two lines if you are using fona or ethernet
#include "AdafruitIO_WiFi.h"
AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);

/******************************* AirLift **************************************/

// the AdafruitIO_AirLift client will work with the following boards:
// - Adafruit PyPortal -> https://www.adafruit.com/product/4116
// - Adafruit Metro M4 Express AirLift Lite -> https://www.adafruit.com/product/4000

// uncomment the following two lines for AirLift,
// and comment out the AdafruitIO_WiFi client in the WIFI section
// #include "AdafruitIO_AIRLIFT.h"
// AdafruitIO_AIRLIFT io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);

/******************************* FONA **************************************/

Expand All @@ -32,7 +42,6 @@ AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);
// #include "AdafruitIO_FONA.h"
// AdafruitIO_FONA io(IO_USERNAME, IO_KEY);


/**************************** ETHERNET ************************************/

// the AdafruitIO_Ethernet client will work with the following boards:
Expand All @@ -41,4 +50,4 @@ AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);
// uncomment the following two lines for ethernet,
// and comment out the AdafruitIO_WiFi client in the WIFI section
// #include "AdafruitIO_Ethernet.h"
// AdafruitIO_Ethernet io(IO_USERNAME, IO_KEY);
// AdafruitIO_Ethernet io(IO_USERNAME, IO_KEY);

0 comments on commit 5b560b3

Please sign in to comment.