Skip to content

Commit

Permalink
Merge pull request #85 from brentru/include-airlift
Browse files Browse the repository at this point in the history
Update AirLift for Boards and Breakouts
  • Loading branch information
ladyada committed Apr 30, 2019
2 parents 5b560b3 + c9532ca commit 66eeae7
Show file tree
Hide file tree
Showing 32 changed files with 744 additions and 489 deletions.
35 changes: 23 additions & 12 deletions examples/adafruitio_00_publish/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,36 @@
// - Feather HUZZAH ESP32 -> https://www.adafruit.com/product/3405
// - Feather M0 WiFi -> https://www.adafruit.com/products/3010
// - Feather WICED -> https://www.adafruit.com/products/3056
// - Adafruit PyPortal -> https://www.adafruit.com/product/4116
// - Adafruit Metro M4 Express AirLift Lite -> https://www.adafruit.com/product/4000
// - Adafruit AirLift Breakout -> https://www.adafruit.com/product/4201

#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 **************************************/
// uncomment the following line if you are using airlift
// #define USE_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 line if you are using winc1500
// #define USE_WINC1500

// 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);
// comment out the following lines if you are using fona or ethernet
#include "AdafruitIO_WiFi.h"

#ifdef USE_AIRLIFT
// Configure the pins used for the ESP32 connection
#if !defined(SPIWIFI_SS) // if the wifi definition isnt in the board variant
// Don't change the names of these #define's! they match the variant ones
#define SPIWIFI SPI
#define SPIWIFI_SS 10 // Chip select pin
#define SPIWIFI_ACK 9 // a.k.a BUSY or READY pin
#define ESP32_RESETN 6 // Reset pin
#define ESP32_GPIO0 -1 // Not connected
#endif
AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS, SPIWIFI_SS, SPIWIFI_ACK, ESP32_RESETN, ESP32_GPIO0, &SPIWIFI);
#else
AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);
#endif
/******************************* FONA **************************************/

// the AdafruitIO_FONA client will work with the following boards:
Expand Down
43 changes: 27 additions & 16 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 @@ -13,25 +13,36 @@
// - Feather HUZZAH ESP32 -> https://www.adafruit.com/product/3405
// - Feather M0 WiFi -> https://www.adafruit.com/products/3010
// - Feather WICED -> https://www.adafruit.com/products/3056
// - Adafruit PyPortal -> https://www.adafruit.com/product/4116
// - Adafruit Metro M4 Express AirLift Lite -> https://www.adafruit.com/product/4000
// - Adafruit AirLift Breakout -> https://www.adafruit.com/product/4201

#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);
#define WIFI_SSID "your_ssid"
#define WIFI_PASS "your_pass"

/******************************* AirLift **************************************/
// uncomment the following line if you are using airlift
// #define USE_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 line if you are using winc1500
// #define USE_WINC1500

// 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);
// comment out the following lines if you are using fona or ethernet
#include "AdafruitIO_WiFi.h"

#ifdef USE_AIRLIFT
// Configure the pins used for the ESP32 connection
#if !defined(SPIWIFI_SS) // if the wifi definition isnt in the board variant
// Don't change the names of these #define's! they match the variant ones
#define SPIWIFI SPI
#define SPIWIFI_SS 10 // Chip select pin
#define SPIWIFI_ACK 9 // a.k.a BUSY or READY pin
#define ESP32_RESETN 6 // Reset pin
#define ESP32_GPIO0 -1 // Not connected
#endif
AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS, SPIWIFI_SS, SPIWIFI_ACK, ESP32_RESETN, ESP32_GPIO0, &SPIWIFI);
#else
AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);
#endif
/******************************* FONA **************************************/

// the AdafruitIO_FONA client will work with the following boards:
Expand Down
35 changes: 23 additions & 12 deletions examples/adafruitio_02_pubsub/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,36 @@
// - Feather HUZZAH ESP32 -> https://www.adafruit.com/product/3405
// - Feather M0 WiFi -> https://www.adafruit.com/products/3010
// - Feather WICED -> https://www.adafruit.com/products/3056
// - Adafruit PyPortal -> https://www.adafruit.com/product/4116
// - Adafruit Metro M4 Express AirLift Lite -> https://www.adafruit.com/product/4000
// - Adafruit AirLift Breakout -> https://www.adafruit.com/product/4201

#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 **************************************/
// uncomment the following line if you are using airlift
// #define USE_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 line if you are using winc1500
// #define USE_WINC1500

// 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);
// comment out the following lines if you are using fona or ethernet
#include "AdafruitIO_WiFi.h"

#ifdef USE_AIRLIFT
// Configure the pins used for the ESP32 connection
#if !defined(SPIWIFI_SS) // if the wifi definition isnt in the board variant
// Don't change the names of these #define's! they match the variant ones
#define SPIWIFI SPI
#define SPIWIFI_SS 10 // Chip select pin
#define SPIWIFI_ACK 9 // a.k.a BUSY or READY pin
#define ESP32_RESETN 6 // Reset pin
#define ESP32_GPIO0 -1 // Not connected
#endif
AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS, SPIWIFI_SS, SPIWIFI_ACK, ESP32_RESETN, ESP32_GPIO0, &SPIWIFI);
#else
AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);
#endif
/******************************* FONA **************************************/

// the AdafruitIO_FONA client will work with the following boards:
Expand Down
35 changes: 23 additions & 12 deletions examples/adafruitio_03_multiple_feeds/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,36 @@
// - Feather HUZZAH ESP32 -> https://www.adafruit.com/product/3405
// - Feather M0 WiFi -> https://www.adafruit.com/products/3010
// - Feather WICED -> https://www.adafruit.com/products/3056
// - Adafruit PyPortal -> https://www.adafruit.com/product/4116
// - Adafruit Metro M4 Express AirLift Lite -> https://www.adafruit.com/product/4000
// - Adafruit AirLift Breakout -> https://www.adafruit.com/product/4201

#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 **************************************/
// uncomment the following line if you are using airlift
// #define USE_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 line if you are using winc1500
// #define USE_WINC1500

// 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);
// comment out the following lines if you are using fona or ethernet
#include "AdafruitIO_WiFi.h"

#ifdef USE_AIRLIFT
// Configure the pins used for the ESP32 connection
#if !defined(SPIWIFI_SS) // if the wifi definition isnt in the board variant
// Don't change the names of these #define's! they match the variant ones
#define SPIWIFI SPI
#define SPIWIFI_SS 10 // Chip select pin
#define SPIWIFI_ACK 9 // a.k.a BUSY or READY pin
#define ESP32_RESETN 6 // Reset pin
#define ESP32_GPIO0 -1 // Not connected
#endif
AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS, SPIWIFI_SS, SPIWIFI_ACK, ESP32_RESETN, ESP32_GPIO0, &SPIWIFI);
#else
AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);
#endif
/******************************* FONA **************************************/

// the AdafruitIO_FONA client will work with the following boards:
Expand Down
35 changes: 23 additions & 12 deletions examples/adafruitio_04_location/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,36 @@
// - Feather HUZZAH ESP32 -> https://www.adafruit.com/product/3405
// - Feather M0 WiFi -> https://www.adafruit.com/products/3010
// - Feather WICED -> https://www.adafruit.com/products/3056
// - Adafruit PyPortal -> https://www.adafruit.com/product/4116
// - Adafruit Metro M4 Express AirLift Lite -> https://www.adafruit.com/product/4000
// - Adafruit AirLift Breakout -> https://www.adafruit.com/product/4201

#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 **************************************/
// uncomment the following line if you are using airlift
// #define USE_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 line if you are using winc1500
// #define USE_WINC1500

// 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);
// comment out the following lines if you are using fona or ethernet
#include "AdafruitIO_WiFi.h"

#ifdef USE_AIRLIFT
// Configure the pins used for the ESP32 connection
#if !defined(SPIWIFI_SS) // if the wifi definition isnt in the board variant
// Don't change the names of these #define's! they match the variant ones
#define SPIWIFI SPI
#define SPIWIFI_SS 10 // Chip select pin
#define SPIWIFI_ACK 9 // a.k.a BUSY or READY pin
#define ESP32_RESETN 6 // Reset pin
#define ESP32_GPIO0 -1 // Not connected
#endif
AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS, SPIWIFI_SS, SPIWIFI_ACK, ESP32_RESETN, ESP32_GPIO0, &SPIWIFI);
#else
AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);
#endif
/******************************* FONA **************************************/

// the AdafruitIO_FONA client will work with the following boards:
Expand Down
35 changes: 23 additions & 12 deletions examples/adafruitio_05_type_conversion/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,36 @@
// - Feather HUZZAH ESP32 -> https://www.adafruit.com/product/3405
// - Feather M0 WiFi -> https://www.adafruit.com/products/3010
// - Feather WICED -> https://www.adafruit.com/products/3056
// - Adafruit PyPortal -> https://www.adafruit.com/product/4116
// - Adafruit Metro M4 Express AirLift Lite -> https://www.adafruit.com/product/4000
// - Adafruit AirLift Breakout -> https://www.adafruit.com/product/4201

#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 **************************************/
// uncomment the following line if you are using airlift
// #define USE_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 line if you are using winc1500
// #define USE_WINC1500

// 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);
// comment out the following lines if you are using fona or ethernet
#include "AdafruitIO_WiFi.h"

#ifdef USE_AIRLIFT
// Configure the pins used for the ESP32 connection
#if !defined(SPIWIFI_SS) // if the wifi definition isnt in the board variant
// Don't change the names of these #define's! they match the variant ones
#define SPIWIFI SPI
#define SPIWIFI_SS 10 // Chip select pin
#define SPIWIFI_ACK 9 // a.k.a BUSY or READY pin
#define ESP32_RESETN 6 // Reset pin
#define ESP32_GPIO0 -1 // Not connected
#endif
AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS, SPIWIFI_SS, SPIWIFI_ACK, ESP32_RESETN, ESP32_GPIO0, &SPIWIFI);
#else
AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);
#endif
/******************************* FONA **************************************/

// the AdafruitIO_FONA client will work with the following boards:
Expand Down
35 changes: 23 additions & 12 deletions examples/adafruitio_06_digital_in/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,36 @@
// - Feather HUZZAH ESP32 -> https://www.adafruit.com/product/3405
// - Feather M0 WiFi -> https://www.adafruit.com/products/3010
// - Feather WICED -> https://www.adafruit.com/products/3056
// - Adafruit PyPortal -> https://www.adafruit.com/product/4116
// - Adafruit Metro M4 Express AirLift Lite -> https://www.adafruit.com/product/4000
// - Adafruit AirLift Breakout -> https://www.adafruit.com/product/4201

#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 **************************************/
// uncomment the following line if you are using airlift
// #define USE_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 line if you are using winc1500
// #define USE_WINC1500

// 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);
// comment out the following lines if you are using fona or ethernet
#include "AdafruitIO_WiFi.h"

#ifdef USE_AIRLIFT
// Configure the pins used for the ESP32 connection
#if !defined(SPIWIFI_SS) // if the wifi definition isnt in the board variant
// Don't change the names of these #define's! they match the variant ones
#define SPIWIFI SPI
#define SPIWIFI_SS 10 // Chip select pin
#define SPIWIFI_ACK 9 // a.k.a BUSY or READY pin
#define ESP32_RESETN 6 // Reset pin
#define ESP32_GPIO0 -1 // Not connected
#endif
AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS, SPIWIFI_SS, SPIWIFI_ACK, ESP32_RESETN, ESP32_GPIO0, &SPIWIFI);
#else
AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);
#endif
/******************************* FONA **************************************/

// the AdafruitIO_FONA client will work with the following boards:
Expand Down

0 comments on commit 66eeae7

Please sign in to comment.