|
| 1 | +/* |
| 2 | + ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄ |
| 3 | +▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░▌ |
| 4 | +▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀█░▌ |
| 5 | +▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ |
| 6 | +▐░█▄▄▄▄▄▄▄▄▄ ▐░█▄▄▄▄▄▄▄▄▄ ▐░█▄▄▄▄▄▄▄▄▄ ▐░█▄▄▄▄▄▄▄▄▄ ▐░▌ ▐░▌ |
| 7 | +▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░▌ ▐░▌ |
| 8 | + ▀▀▀▀▀▀▀▀▀█░▌▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀▀▀ ▐░▌ ▐░▌ |
| 9 | + ▐░▌▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ |
| 10 | + ▄▄▄▄▄▄▄▄▄█░▌▐░█▄▄▄▄▄▄▄▄▄ ▐░█▄▄▄▄▄▄▄▄▄ ▐░█▄▄▄▄▄▄▄▄▄ ▐░█▄▄▄▄▄▄▄█░▌ |
| 11 | +▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░▌ |
| 12 | + ▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀ |
| 13 | +
|
| 14 | + ▄ ▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ |
| 15 | + ▐░▌ ▐░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌ ▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌ |
| 16 | + ▐░▌ ▐░▌ ▀▀▀▀█░█▀▀▀▀ ▐░█▀▀▀▀▀▀▀█░▌▐░█▀▀▀▀▀▀▀█░▌ ▐░█▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀█░▌ |
| 17 | + ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌▐░▌ ▐░▌ ▐░▌ ▐░▌ |
| 18 | + ▐░▐░▌ ▐░▌ ▐░█▄▄▄▄▄▄▄█░▌▐░▌ ▐░▌ ▐░█▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄█░▌ |
| 19 | + ▐░▌ ▐░▌ ▐░░░░░░░░░░░▌▐░▌ ▐░▌ ▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌ |
| 20 | + ▐░▌░▌ ▐░▌ ▐░█▀▀▀▀▀▀▀█░▌▐░▌ ▐░▌ ▀▀▀▀▀▀▀▀▀█░▌ ▀▀▀▀▀▀▀▀▀█░▌ |
| 21 | + ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌▐░▌ ▐░▌ ▐░▌ ▐░▌ |
| 22 | + ▐░▌ ▐░▌ ▄▄▄▄█░█▄▄▄▄ ▐░▌ ▐░▌▐░█▄▄▄▄▄▄▄█░▌ ▄▄▄▄▄▄▄▄▄█░▌ ▄▄▄▄▄▄▄▄▄█░▌ |
| 23 | + ▐░▌ ▐░▌▐░░░░░░░░░░░▌▐░▌ ▐░▌▐░░░░░░░░░░░▌ ▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌ |
| 24 | + ▀ ▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀ ▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀ |
| 25 | +*/ |
| 26 | + |
| 27 | +/* |
| 28 | +Board Information: https://www.seeedstudio.com/XIAO-ESP32S3-p-5627.html |
| 29 | +Expansion Board Infomation : https://www.seeedstudio.com/Wio-SX1262-for-XIAO-p-6379.html |
| 30 | +L76K GPS Module Information : https://www.seeedstudio.com/L76K-GNSS-Module-for-Seeed-Studio-XIAO-p-5864.html |
| 31 | +*/ |
| 32 | + |
| 33 | +#define LED_PIN 48 |
| 34 | +#define LED_STATE_ON 1 // State when LED is lit |
| 35 | + |
| 36 | +#define BUTTON_PIN 21 // This is the Program Button |
| 37 | +#define BUTTON_NEED_PULLUP |
| 38 | + |
| 39 | +#define BATTERY_PIN -1 |
| 40 | +#define ADC_CHANNEL ADC1_GPIO1_CHANNEL |
| 41 | +#define BATTERY_SENSE_RESOLUTION_BITS 12 |
| 42 | + |
| 43 | +/*Warning: |
| 44 | + https://www.seeedstudio.com/L76K-GNSS-Module-for-Seeed-Studio-XIAO-p-5864.html |
| 45 | + L76K Expansion Board can not directly used, L76K Reset Pin needs to override or physically remove it, |
| 46 | + otherwise it will conflict with the SPI pins |
| 47 | +*/ |
| 48 | +#define GPS_L76K |
| 49 | +#ifdef GPS_L76K |
| 50 | +#define GPS_RX_PIN 44 |
| 51 | +#define GPS_TX_PIN 43 |
| 52 | +#define HAS_GPS 1 |
| 53 | +#define GPS_BAUDRATE 9600 |
| 54 | +#define GPS_THREAD_INTERVAL 50 |
| 55 | +#define PIN_SERIAL1_RX PIN_GPS_TX |
| 56 | +#define PIN_SERIAL1_TX PIN_GPS_RX |
| 57 | +#define PIN_GPS_STANDBY 1 |
| 58 | +#endif |
| 59 | + |
| 60 | +#define I2C_SDA 5 |
| 61 | +#define I2C_SCL 6 |
| 62 | + |
| 63 | +// XIAO S3 LORA module |
| 64 | +#define USE_SX1262 |
| 65 | + |
| 66 | +#define LORA_MISO 8 |
| 67 | +#define LORA_SCK 7 |
| 68 | +#define LORA_MOSI 9 |
| 69 | +#define LORA_CS 5 |
| 70 | + |
| 71 | +#define LORA_RESET 3 |
| 72 | +#define LORA_DIO1 2 |
| 73 | + |
| 74 | +#define LORA_DIO2 6 |
| 75 | + |
| 76 | +#ifdef USE_SX1262 |
| 77 | +#define SX126X_CS LORA_CS |
| 78 | +#define SX126X_DIO1 LORA_DIO1 |
| 79 | +#define SX126X_BUSY 4 |
| 80 | +#define SX126X_RESET LORA_RESET |
| 81 | + |
| 82 | +// DIO2 controlls an antenna switch and the TCXO voltage is controlled by DIO3 |
| 83 | +#define SX126X_DIO2_AS_RF_SWITCH |
| 84 | +#define SX126X_RXEN 6 |
| 85 | +#define SX126X_TXEN RADIOLIB_NC |
| 86 | +#define SX126X_DIO3_TCXO_VOLTAGE 1.8 |
| 87 | +#endif |
0 commit comments