|
29 | 29 | // comment out the following lines if you are using fona or ethernet
|
30 | 30 | #include "AdafruitIO_WiFi.h"
|
31 | 31 |
|
32 |
| -#ifdef USE_AIRLIFT |
33 |
| -// Configure the pins used for the ESP32 connection |
34 |
| -#if !defined(SPIWIFI_SS) // if the wifi definition isnt in the board variant |
35 |
| -// Don't change the names of these #define's! they match the variant ones |
36 |
| -#define SPIWIFI SPI |
37 |
| -#define SPIWIFI_SS 10 // Chip select pin |
38 |
| -#define SPIWIFI_ACK 9 // a.k.a BUSY or READY pin |
39 |
| -#define ESP32_RESETN 6 // Reset pin |
40 |
| -#define ESP32_GPIO0 -1 // Not connected |
41 |
| -#endif |
42 |
| -AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS, SPIWIFI_SS, SPIWIFI_ACK, ESP32_RESETN, ESP32_GPIO0, &SPIWIFI); |
| 32 | +#if defined(USE_AIRLIFT) || defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE) |
| 33 | + // Configure the pins used for the ESP32 connection |
| 34 | + #if !defined(SPIWIFI_SS) // if the wifi definition isnt in the board variant |
| 35 | + // Don't change the names of these #define's! they match the variant ones |
| 36 | + #define SPIWIFI SPI |
| 37 | + #define SPIWIFI_SS 10 // Chip select pin |
| 38 | + #define SPIWIFI_ACK 9 // a.k.a BUSY or READY pin |
| 39 | + #define ESP32_RESETN 6 // Reset pin |
| 40 | + #define ESP32_GPIO0 -1 // Not connected |
| 41 | + #endif |
| 42 | + AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS, SPIWIFI_SS, SPIWIFI_ACK, ESP32_RESETN, ESP32_GPIO0, &SPIWIFI); |
43 | 43 | #else
|
44 |
| -AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS); |
| 44 | + AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS); |
45 | 45 | #endif
|
46 | 46 | /******************************* FONA **************************************/
|
47 | 47 |
|
|
0 commit comments