2024-09-25 10:27:14 +00:00
|
|
|
/*
|
|
|
|
▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄
|
|
|
|
▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░▌
|
|
|
|
▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀█░▌
|
|
|
|
▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌
|
|
|
|
▐░█▄▄▄▄▄▄▄▄▄ ▐░█▄▄▄▄▄▄▄▄▄ ▐░█▄▄▄▄▄▄▄▄▄ ▐░█▄▄▄▄▄▄▄▄▄ ▐░▌ ▐░▌
|
|
|
|
▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░▌ ▐░▌
|
|
|
|
▀▀▀▀▀▀▀▀▀█░▌▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀▀▀ ▐░▌ ▐░▌
|
|
|
|
▐░▌▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌
|
|
|
|
▄▄▄▄▄▄▄▄▄█░▌▐░█▄▄▄▄▄▄▄▄▄ ▐░█▄▄▄▄▄▄▄▄▄ ▐░█▄▄▄▄▄▄▄▄▄ ▐░█▄▄▄▄▄▄▄█░▌
|
|
|
|
▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░▌
|
|
|
|
▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀
|
|
|
|
|
|
|
|
▄ ▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄
|
|
|
|
▐░▌ ▐░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌ ▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌
|
|
|
|
▐░▌ ▐░▌ ▀▀▀▀█░█▀▀▀▀ ▐░█▀▀▀▀▀▀▀█░▌▐░█▀▀▀▀▀▀▀█░▌ ▐░█▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀█░▌
|
|
|
|
▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌▐░▌ ▐░▌ ▐░▌ ▐░▌
|
|
|
|
▐░▐░▌ ▐░▌ ▐░█▄▄▄▄▄▄▄█░▌▐░▌ ▐░▌ ▐░█▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄█░▌
|
|
|
|
▐░▌ ▐░▌ ▐░░░░░░░░░░░▌▐░▌ ▐░▌ ▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌
|
|
|
|
▐░▌░▌ ▐░▌ ▐░█▀▀▀▀▀▀▀█░▌▐░▌ ▐░▌ ▀▀▀▀▀▀▀▀▀█░▌ ▀▀▀▀▀▀▀▀▀█░▌
|
|
|
|
▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌▐░▌ ▐░▌ ▐░▌ ▐░▌
|
|
|
|
▐░▌ ▐░▌ ▄▄▄▄█░█▄▄▄▄ ▐░▌ ▐░▌▐░█▄▄▄▄▄▄▄█░▌ ▄▄▄▄▄▄▄▄▄█░▌ ▄▄▄▄▄▄▄▄▄█░▌
|
|
|
|
▐░▌ ▐░▌▐░░░░░░░░░░░▌▐░▌ ▐░▌▐░░░░░░░░░░░▌ ▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌
|
|
|
|
▀ ▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀ ▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
Board Information: https://www.seeedstudio.com/XIAO-ESP32S3-Sense-p-5639.html
|
|
|
|
Expansion Board Infomation : https://www.seeedstudio.com/Seeeduino-XIAO-Expansion-board-p-4746.html
|
|
|
|
L76K GPS Module Information : https://www.seeedstudio.com/L76K-GNSS-Module-for-Seeed-Studio-XIAO-p-5864.html
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define LED_PIN 48
|
|
|
|
#define LED_STATE_ON 1 // State when LED is lit
|
|
|
|
|
|
|
|
#define BUTTON_PIN 21 // This is the Program Button
|
|
|
|
#define BUTTON_NEED_PULLUP
|
|
|
|
|
|
|
|
/*Warning:
|
|
|
|
https://www.seeedstudio.com/L76K-GNSS-Module-for-Seeed-Studio-XIAO-p-5864.html
|
|
|
|
L76K Expansion Board can not directly used, L76K Reset Pin needs to override or physically remove it,
|
|
|
|
otherwise it will conflict with the SPI pins
|
|
|
|
*/
|
2024-12-02 08:59:34 +00:00
|
|
|
#define GPS_L76K
|
2024-09-25 10:27:14 +00:00
|
|
|
#ifdef GPS_L76K
|
|
|
|
#define GPS_RX_PIN 44
|
|
|
|
#define GPS_TX_PIN 43
|
|
|
|
#define HAS_GPS 1
|
|
|
|
#define GPS_BAUDRATE 9600
|
|
|
|
#define GPS_THREAD_INTERVAL 50
|
|
|
|
#define PIN_SERIAL1_RX PIN_GPS_TX
|
|
|
|
#define PIN_SERIAL1_TX PIN_GPS_RX
|
|
|
|
#define PIN_GPS_STANDBY 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// XIAO S3 Expansion board has 1.3 inch OLED Screen
|
|
|
|
#define USCREEN_SSD1306
|
|
|
|
|
|
|
|
#define I2C_SDA 5
|
|
|
|
#define I2C_SCL 6
|
|
|
|
|
|
|
|
// XIAO S3 LORA module
|
|
|
|
#define USE_SX1262
|
|
|
|
|
|
|
|
#define LORA_MISO 8
|
|
|
|
#define LORA_SCK 7
|
|
|
|
#define LORA_MOSI 9
|
|
|
|
#define LORA_CS 41
|
|
|
|
|
|
|
|
#define LORA_RESET 42
|
|
|
|
#define LORA_DIO1 39
|
|
|
|
|
|
|
|
#define LORA_DIO2 38
|
|
|
|
|
|
|
|
#ifdef USE_SX1262
|
|
|
|
#define SX126X_CS LORA_CS
|
|
|
|
#define SX126X_DIO1 LORA_DIO1
|
|
|
|
#define SX126X_BUSY 40
|
|
|
|
#define SX126X_RESET LORA_RESET
|
|
|
|
|
|
|
|
// DIO2 controlls an antenna switch and the TCXO voltage is controlled by DIO3
|
|
|
|
#define SX126X_DIO2_AS_RF_SWITCH
|
2024-12-07 20:32:49 +00:00
|
|
|
#define SX126X_RXEN 38
|
|
|
|
#define SX126X_TXEN RADIOLIB_NC
|
2024-09-25 10:27:14 +00:00
|
|
|
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
|
2024-12-02 08:59:34 +00:00
|
|
|
#endif
|