|
| 1 | +/************************ Adafruit IO Config *******************************/ |
| 2 | + |
| 3 | +// visit io.adafruit.com if you need to create an account, |
| 4 | +// or if you need your Adafruit IO key. |
| 5 | +#define IO_USERNAME "your_username" |
| 6 | +#define IO_KEY "your_key" |
| 7 | + |
| 8 | +/******************************* WIFI **************************************/ |
| 9 | + |
| 10 | +// the AdafruitIO_WiFi client will work with the following boards: |
| 11 | +// - HUZZAH ESP8266 Breakout -> https://www.adafruit.com/products/2471 |
| 12 | +// - Feather HUZZAH ESP8266 -> https://www.adafruit.com/products/2821 |
| 13 | +// - Feather HUZZAH ESP32 -> https://www.adafruit.com/product/3405 |
| 14 | +// - Feather M0 WiFi -> https://www.adafruit.com/products/3010 |
| 15 | +// - Feather WICED -> https://www.adafruit.com/products/3056 |
| 16 | +// - Adafruit PyPortal -> https://www.adafruit.com/product/4116 |
| 17 | +// - Adafruit Metro M4 Express AirLift Lite -> https://www.adafruit.com/product/4000 |
| 18 | +// - Adafruit AirLift Breakout -> https://www.adafruit.com/product/4201 |
| 19 | +// - Adafruit AirLift Shield -> https://www.adafruit.com/product/4285 |
| 20 | +// - Adafruit AirLift FeatherWing -> https://www.adafruit.com/product/4264 |
| 21 | + |
| 22 | +#define WIFI_SSID "" // if "" then you must self connect to WiFi |
| 23 | +#define WIFI_PASS "your_pass" |
| 24 | +#define SELF_SSID "your_ssid" // an SSID for self connected WiFi |
| 25 | + |
| 26 | +// uncomment the following line if you are using airlift |
| 27 | +// #define USE_AIRLIFT |
| 28 | + |
| 29 | +// uncomment the following line if you are using winc1500 |
| 30 | +#define USE_WINC1500 |
| 31 | + |
| 32 | +// comment out the following lines if you are using fona or ethernet |
| 33 | +#include "AdafruitIO_WiFi.h" |
| 34 | + |
| 35 | +#if defined(USE_AIRLIFT) || defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE) |
| 36 | + // Configure the pins used for the ESP32 connection |
| 37 | + #if !defined(SPIWIFI_SS) // if the wifi definition isnt in the board variant |
| 38 | + // Don't change the names of these #define's! they match the variant ones |
| 39 | + #define SPIWIFI SPI |
| 40 | + #define SPIWIFI_SS 10 // Chip select pin |
| 41 | + #define NINA_ACK 9 // a.k.a BUSY or READY pin |
| 42 | + #define NINA_RESETN 6 // Reset pin |
| 43 | + #define NINA_GPIO0 -1 // Not connected |
| 44 | + #endif |
| 45 | + AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS, SPIWIFI_SS, NINA_ACK, NINA_RESETN, NINA_GPIO0, &SPIWIFI); |
| 46 | +#else |
| 47 | + AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS); |
| 48 | +#endif |
| 49 | +/******************************* FONA **************************************/ |
| 50 | + |
| 51 | +// the AdafruitIO_FONA client will work with the following boards: |
| 52 | +// - Feather 32u4 FONA -> https://www.adafruit.com/product/3027 |
| 53 | + |
| 54 | +// uncomment the following two lines for 32u4 FONA, |
| 55 | +// and comment out the AdafruitIO_WiFi client in the WIFI section |
| 56 | +// #include "AdafruitIO_FONA.h" |
| 57 | +// AdafruitIO_FONA io(IO_USERNAME, IO_KEY); |
| 58 | + |
| 59 | +/**************************** ETHERNET ************************************/ |
| 60 | + |
| 61 | +// the AdafruitIO_Ethernet client will work with the following boards: |
| 62 | +// - Ethernet FeatherWing -> https://www.adafruit.com/products/3201 |
| 63 | + |
| 64 | +// uncomment the following two lines for ethernet, |
| 65 | +// and comment out the AdafruitIO_WiFi client in the WIFI section |
| 66 | +// #include "AdafruitIO_Ethernet.h" |
| 67 | +// AdafruitIO_Ethernet io(IO_USERNAME, IO_KEY); |
0 commit comments