Skip to content

Commit 5b560b3

Browse files
authored
Merge pull request #84 from brentru/airlift-standalone
Adding AirLift Compatibility for PyPortal and Metro M4 WiFi
2 parents 3c611fd + bc85d20 commit 5b560b3

File tree

33 files changed

+595
-176
lines changed

33 files changed

+595
-176
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,6 @@
99
.piolibdeps
1010
platformio.ini
1111
.tests
12+
13+
# visual studio code
14+
.vscode
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

examples/adafruitio_00_publish/config.h

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
// visit io.adafruit.com if you need to create an account,
44
// or if you need your Adafruit IO key.
5-
#define IO_USERNAME "your_username"
6-
#define IO_KEY "your_key"
5+
#define IO_USERNAME "your_username"
6+
#define IO_KEY "your_key"
77

88
/******************************* WIFI **************************************/
99

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

17-
#define WIFI_SSID "your_ssid"
18-
#define WIFI_PASS "your_pass"
17+
#define WIFI_SSID "your_ssid"
18+
#define WIFI_PASS "your_pass"
1919

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

24+
/******************************* AirLift **************************************/
25+
26+
// the AdafruitIO_AirLift client will work with the following boards:
27+
// - Adafruit PyPortal -> https://www.adafruit.com/product/4116
28+
// - Adafruit Metro M4 Express AirLift Lite -> https://www.adafruit.com/product/4000
29+
30+
// uncomment the following two lines for AirLift,
31+
// and comment out the AdafruitIO_WiFi client in the WIFI section
32+
// #include "AdafruitIO_AIRLIFT.h"
33+
// AdafruitIO_AIRLIFT io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);
2434

2535
/******************************* FONA **************************************/
2636

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

35-
3645
/**************************** ETHERNET ************************************/
3746

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

examples/adafruitio_01_subscribe/config.h

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
// visit io.adafruit.com if you need to create an account,
44
// or if you need your Adafruit IO key.
5-
#define IO_USERNAME "your_username"
6-
#define IO_KEY "your_key"
5+
#define IO_USERNAME "your_username"
6+
#define IO_KEY "your_key"
77

88
/******************************* WIFI **************************************/
99

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

17-
#define WIFI_SSID "your_ssid"
18-
#define WIFI_PASS "your_pass"
17+
#define WIFI_SSID "your_ssid"
18+
#define WIFI_PASS "your_pass"
1919

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

24+
/******************************* AirLift **************************************/
25+
26+
// the AdafruitIO_AirLift client will work with the following boards:
27+
// - Adafruit PyPortal -> https://www.adafruit.com/product/4116
28+
// - Adafruit Metro M4 Express AirLift Lite -> https://www.adafruit.com/product/4000
29+
30+
// uncomment the following two lines for AirLift,
31+
// and comment out the AdafruitIO_WiFi client in the WIFI section
32+
// #include "AdafruitIO_AIRLIFT.h"
33+
// AdafruitIO_AIRLIFT io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);
2434

2535
/******************************* FONA **************************************/
2636

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

35-
3645
/**************************** ETHERNET ************************************/
3746

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

examples/adafruitio_02_pubsub/config.h

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
// visit io.adafruit.com if you need to create an account,
44
// or if you need your Adafruit IO key.
5-
#define IO_USERNAME "your_username"
6-
#define IO_KEY "your_key"
5+
#define IO_USERNAME "your_username"
6+
#define IO_KEY "your_key"
77

88
/******************************* WIFI **************************************/
99

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

17-
#define WIFI_SSID "your_ssid"
18-
#define WIFI_PASS "your_pass"
17+
#define WIFI_SSID "your_ssid"
18+
#define WIFI_PASS "your_pass"
1919

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

24+
/******************************* AirLift **************************************/
25+
26+
// the AdafruitIO_AirLift client will work with the following boards:
27+
// - Adafruit PyPortal -> https://www.adafruit.com/product/4116
28+
// - Adafruit Metro M4 Express AirLift Lite -> https://www.adafruit.com/product/4000
29+
30+
// uncomment the following two lines for AirLift,
31+
// and comment out the AdafruitIO_WiFi client in the WIFI section
32+
// #include "AdafruitIO_AIRLIFT.h"
33+
// AdafruitIO_AIRLIFT io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);
2434

2535
/******************************* FONA **************************************/
2636

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

35-
3645
/**************************** ETHERNET ************************************/
3746

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

examples/adafruitio_03_multiple_feeds/config.h

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
// visit io.adafruit.com if you need to create an account,
44
// or if you need your Adafruit IO key.
5-
#define IO_USERNAME "your_username"
6-
#define IO_KEY "your_key"
5+
#define IO_USERNAME "your_username"
6+
#define IO_KEY "your_key"
77

88
/******************************* WIFI **************************************/
99

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

17-
#define WIFI_SSID "your_ssid"
18-
#define WIFI_PASS "your_pass"
17+
#define WIFI_SSID "your_ssid"
18+
#define WIFI_PASS "your_pass"
1919

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

24+
/******************************* AirLift **************************************/
25+
26+
// the AdafruitIO_AirLift client will work with the following boards:
27+
// - Adafruit PyPortal -> https://www.adafruit.com/product/4116
28+
// - Adafruit Metro M4 Express AirLift Lite -> https://www.adafruit.com/product/4000
29+
30+
// uncomment the following two lines for AirLift,
31+
// and comment out the AdafruitIO_WiFi client in the WIFI section
32+
// #include "AdafruitIO_AIRLIFT.h"
33+
// AdafruitIO_AIRLIFT io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);
2434

2535
/******************************* FONA **************************************/
2636

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

35-
3645
/**************************** ETHERNET ************************************/
3746

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

examples/adafruitio_04_location/config.h

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
// visit io.adafruit.com if you need to create an account,
44
// or if you need your Adafruit IO key.
5-
#define IO_USERNAME "your_username"
6-
#define IO_KEY "your_key"
5+
#define IO_USERNAME "your_username"
6+
#define IO_KEY "your_key"
77

88
/******************************* WIFI **************************************/
99

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

17-
#define WIFI_SSID "your_ssid"
18-
#define WIFI_PASS "your_pass"
17+
#define WIFI_SSID "your_ssid"
18+
#define WIFI_PASS "your_pass"
1919

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

24+
/******************************* AirLift **************************************/
25+
26+
// the AdafruitIO_AirLift client will work with the following boards:
27+
// - Adafruit PyPortal -> https://www.adafruit.com/product/4116
28+
// - Adafruit Metro M4 Express AirLift Lite -> https://www.adafruit.com/product/4000
29+
30+
// uncomment the following two lines for AirLift,
31+
// and comment out the AdafruitIO_WiFi client in the WIFI section
32+
// #include "AdafruitIO_AIRLIFT.h"
33+
// AdafruitIO_AIRLIFT io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);
2434

2535
/******************************* FONA **************************************/
2636

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

35-
3645
/**************************** ETHERNET ************************************/
3746

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

examples/adafruitio_05_type_conversion/config.h

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
// visit io.adafruit.com if you need to create an account,
44
// or if you need your Adafruit IO key.
5-
#define IO_USERNAME "your_username"
6-
#define IO_KEY "your_key"
5+
#define IO_USERNAME "your_username"
6+
#define IO_KEY "your_key"
77

88
/******************************* WIFI **************************************/
99

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

17-
#define WIFI_SSID "your_ssid"
18-
#define WIFI_PASS "your_pass"
17+
#define WIFI_SSID "your_ssid"
18+
#define WIFI_PASS "your_pass"
1919

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

24+
/******************************* AirLift **************************************/
25+
26+
// the AdafruitIO_AirLift client will work with the following boards:
27+
// - Adafruit PyPortal -> https://www.adafruit.com/product/4116
28+
// - Adafruit Metro M4 Express AirLift Lite -> https://www.adafruit.com/product/4000
29+
30+
// uncomment the following two lines for AirLift,
31+
// and comment out the AdafruitIO_WiFi client in the WIFI section
32+
// #include "AdafruitIO_AIRLIFT.h"
33+
// AdafruitIO_AIRLIFT io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);
2434

2535
/******************************* FONA **************************************/
2636

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

35-
3645
/**************************** ETHERNET ************************************/
3746

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

examples/adafruitio_06_digital_in/config.h

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
// visit io.adafruit.com if you need to create an account,
44
// or if you need your Adafruit IO key.
5-
#define IO_USERNAME "your_username"
6-
#define IO_KEY "your_key"
5+
#define IO_USERNAME "your_username"
6+
#define IO_KEY "your_key"
77

88
/******************************* WIFI **************************************/
99

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

17-
#define WIFI_SSID "your_ssid"
18-
#define WIFI_PASS "your_pass"
17+
#define WIFI_SSID "your_ssid"
18+
#define WIFI_PASS "your_pass"
1919

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

24+
/******************************* AirLift **************************************/
25+
26+
// the AdafruitIO_AirLift client will work with the following boards:
27+
// - Adafruit PyPortal -> https://www.adafruit.com/product/4116
28+
// - Adafruit Metro M4 Express AirLift Lite -> https://www.adafruit.com/product/4000
29+
30+
// uncomment the following two lines for AirLift,
31+
// and comment out the AdafruitIO_WiFi client in the WIFI section
32+
// #include "AdafruitIO_AIRLIFT.h"
33+
// AdafruitIO_AIRLIFT io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);
2434

2535
/******************************* FONA **************************************/
2636

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

35-
3645
/**************************** ETHERNET ************************************/
3746

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

0 commit comments

Comments
 (0)