mirror of
https://github.com/richonguzman/LoRa_APRS_iGate.git
synced 2026-03-11 16:03:58 +01:00
SensorRead with UEM fix
This commit is contained in:
parent
5c5c940d71
commit
c5dcc4c7ab
|
|
@ -67,7 +67,7 @@ ___________________________________________________________________*/
|
|||
#endif
|
||||
|
||||
|
||||
String versionDate = "2025-09-02";
|
||||
String versionDate = "2025-09-08";
|
||||
String versionNumber = "3.1";
|
||||
Configuration Config;
|
||||
WiFiClient aprsIsClient;
|
||||
|
|
|
|||
|
|
@ -296,18 +296,6 @@ namespace POWER_Utils {
|
|||
adc_ctrl_OFF();
|
||||
#endif
|
||||
|
||||
#if defined(HELTEC_WIRELESS_TRACKER)
|
||||
Wire.begin(BOARD_I2C_SDA, BOARD_I2C_SCL);
|
||||
#endif
|
||||
|
||||
#if defined(HELTEC_V3) || defined(HELTEC_V3_2) || defined(HELTEC_WS) || defined(LIGHTGATEWAY_1_0) || defined(LIGHTGATEWAY_PLUS_1_0) || defined(TTGO_LORA32_T3S3_V1_2) || defined(HELTEC_V2)
|
||||
Wire.begin(OLED_SDA, OLED_SCL);
|
||||
#endif
|
||||
|
||||
#if defined(HELTEC_V3) || defined(HELTEC_V3_2) || defined(HELTEC_WP_V1) || defined(HELTEC_WSL_V3) || defined(HELTEC_WSL_V3_DISPLAY)
|
||||
Wire1.begin(BOARD_I2C_SDA, BOARD_I2C_SCL);
|
||||
#endif
|
||||
|
||||
#if defined(TTGO_T_DECK_GPS) || defined(TTGO_T_DECK_PLUS)
|
||||
pinMode(BOARD_POWERON, OUTPUT);
|
||||
digitalWrite(BOARD_POWERON, HIGH);
|
||||
|
|
@ -321,9 +309,20 @@ namespace POWER_Utils {
|
|||
digitalWrite(TFT_CS, HIGH);
|
||||
|
||||
delay(500);
|
||||
#endif
|
||||
|
||||
#ifdef USE_WIRE_WITH_OLED_PINS
|
||||
Wire.begin(OLED_SDA, OLED_SCL);
|
||||
#endif
|
||||
|
||||
#ifdef USE_WIRE_WITH_BOARD_I2C_PINS
|
||||
Wire.begin(BOARD_I2C_SDA, BOARD_I2C_SCL);
|
||||
#endif
|
||||
|
||||
#ifdef USE_WIRE1_WITH_BOARD_I2C_PINS
|
||||
Wire1.begin(BOARD_I2C_SDA, BOARD_I2C_SCL);
|
||||
#endif
|
||||
|
||||
delay(1000);
|
||||
BATTERY_Utils::setup();
|
||||
BATTERY_Utils::startupBatteryHealth();
|
||||
|
|
|
|||
|
|
@ -71,6 +71,7 @@ namespace WX_Utils {
|
|||
#endif
|
||||
err = Wire.endTransmission();
|
||||
#endif
|
||||
delay(5);
|
||||
if (err == 0) {
|
||||
//Serial.println(addr); //this shows any connected board to I2C
|
||||
if (addr == 0x76 || addr == 0x77) { // BME or BMP
|
||||
|
|
|
|||
|
|
@ -32,6 +32,9 @@
|
|||
#define RADIO_WAKEUP_PIN RADIO_DIO1_PIN
|
||||
#define GPIO_WAKEUP_PIN GPIO_NUM_3
|
||||
|
||||
// I2C
|
||||
#define USE_WIRE_WITH_OLED_PINS
|
||||
|
||||
// Display
|
||||
#define HAS_DISPLAY
|
||||
|
||||
|
|
|
|||
|
|
@ -34,6 +34,9 @@
|
|||
#define RADIO_WAKEUP_PIN RADIO_DIO1_PIN
|
||||
#define GPIO_WAKEUP_PIN GPIO_SEL_12
|
||||
|
||||
// I2C
|
||||
#define USE_WIRE_WITH_OLED_PINS
|
||||
|
||||
// Display
|
||||
#define HAS_DISPLAY
|
||||
|
||||
|
|
|
|||
|
|
@ -34,8 +34,11 @@
|
|||
#define RADIO_WAKEUP_PIN RADIO_DIO1_PIN
|
||||
#define GPIO_WAKEUP_PIN GPIO_SEL_12
|
||||
|
||||
// I2C
|
||||
#define USE_WIRE_WITH_OLED_PINS
|
||||
|
||||
// Display
|
||||
#define HAS_DISPLAY
|
||||
#define HAS_DISPLAY
|
||||
|
||||
#undef OLED_SDA
|
||||
#undef OLED_SCL
|
||||
|
|
|
|||
|
|
@ -34,6 +34,9 @@
|
|||
#define RADIO_WAKEUP_PIN RADIO_DIO1_PIN
|
||||
#define GPIO_WAKEUP_PIN GPIO_SEL_12
|
||||
|
||||
// I2C
|
||||
#define USE_WIRE_WITH_OLED_PINS
|
||||
|
||||
// Display
|
||||
#define HAS_DISPLAY
|
||||
|
||||
|
|
|
|||
|
|
@ -34,6 +34,9 @@
|
|||
#define RADIO_WAKEUP_PIN RADIO_DIO1_PIN
|
||||
#define GPIO_WAKEUP_PIN GPIO_SEL_33
|
||||
|
||||
// I2C
|
||||
#define USE_WIRE_WITH_OLED_PINS
|
||||
|
||||
// Display
|
||||
#define HAS_DISPLAY
|
||||
|
||||
|
|
|
|||
|
|
@ -30,6 +30,9 @@
|
|||
#define RADIO_WAKEUP_PIN RADIO_BUSY_PIN
|
||||
#define GPIO_WAKEUP_PIN GPIO_SEL_26
|
||||
|
||||
// I2C
|
||||
#define USE_WIRE_WITH_OLED_PINS
|
||||
|
||||
// Display
|
||||
#define HAS_DISPLAY
|
||||
|
||||
|
|
|
|||
|
|
@ -30,6 +30,9 @@
|
|||
#define RADIO_WAKEUP_PIN RADIO_BUSY_PIN
|
||||
#define GPIO_WAKEUP_PIN GPIO_SEL_26
|
||||
|
||||
// I2C
|
||||
#define USE_WIRE_WITH_OLED_PINS
|
||||
|
||||
// Display
|
||||
#define HAS_DISPLAY
|
||||
|
||||
|
|
|
|||
|
|
@ -28,6 +28,9 @@
|
|||
#define RADIO_RST_PIN 0
|
||||
#define RADIO_BUSY_PIN 32
|
||||
|
||||
// I2C
|
||||
#define USE_WIRE_WITH_OLED_PINS
|
||||
|
||||
// Display
|
||||
#define HAS_DISPLAY
|
||||
|
||||
|
|
|
|||
|
|
@ -28,6 +28,9 @@
|
|||
#define RADIO_RST_PIN 0
|
||||
#define RADIO_BUSY_PIN 32
|
||||
|
||||
// I2C
|
||||
#define USE_WIRE_WITH_OLED_PINS
|
||||
|
||||
// Display
|
||||
#define HAS_DISPLAY
|
||||
|
||||
|
|
|
|||
|
|
@ -34,6 +34,9 @@
|
|||
#define RADIO_WAKEUP_PIN RADIO_DIO1_PIN
|
||||
#define GPIO_WAKEUP_PIN GPIO_SEL_33
|
||||
|
||||
// I2C
|
||||
#define USE_WIRE_WITH_OLED_PINS
|
||||
|
||||
// Display
|
||||
#define HAS_DISPLAY
|
||||
|
||||
|
|
|
|||
|
|
@ -34,6 +34,9 @@
|
|||
#define RADIO_WAKEUP_PIN RADIO_DIO1_PIN
|
||||
#define GPIO_WAKEUP_PIN GPIO_SEL_5
|
||||
|
||||
// I2C
|
||||
#define USE_WIRE_WITH_OLED_PINS
|
||||
|
||||
// Display
|
||||
#define HAS_DISPLAY
|
||||
|
||||
|
|
|
|||
|
|
@ -35,6 +35,9 @@
|
|||
#define RADIO_WAKEUP_PIN RADIO_DIO1_PIN
|
||||
#define GPIO_WAKEUP_PIN GPIO_SEL_5
|
||||
|
||||
// I2C
|
||||
#define USE_WIRE_WITH_OLED_PINS
|
||||
|
||||
// Display
|
||||
#define HAS_DISPLAY
|
||||
|
||||
|
|
|
|||
|
|
@ -30,6 +30,9 @@
|
|||
#define RADIO_WAKEUP_PIN RADIO_BUSY_PIN
|
||||
#define GPIO_WAKEUP_PIN GPIO_SEL_26
|
||||
|
||||
// I2C
|
||||
#define USE_WIRE_WITH_OLED_PINS
|
||||
|
||||
// Display
|
||||
#define HAS_DISPLAY
|
||||
|
||||
|
|
|
|||
|
|
@ -31,6 +31,9 @@
|
|||
#define RADIO_WAKEUP_PIN RADIO_BUSY_PIN
|
||||
#define GPIO_WAKEUP_PIN GPIO_SEL_12
|
||||
|
||||
// I2C
|
||||
#define USE_WIRE_WITH_OLED_PINS
|
||||
|
||||
// Display
|
||||
#define HAS_DISPLAY
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,10 @@
|
|||
#define RADIO_WAKEUP_PIN RADIO_BUSY_PIN
|
||||
#define GPIO_WAKEUP_PIN GPIO_SEL_25
|
||||
|
||||
// Display
|
||||
// I2C
|
||||
#define USE_WIRE_WITH_OLED_PINS
|
||||
|
||||
// Display
|
||||
#define HAS_DISPLAY
|
||||
|
||||
#undef OLED_SDA
|
||||
|
|
|
|||
|
|
@ -30,6 +30,11 @@
|
|||
#define RADIO_WAKEUP_PIN RADIO_BUSY_PIN
|
||||
#define GPIO_WAKEUP_PIN GPIO_SEL_38
|
||||
|
||||
// I2C
|
||||
#define USE_WIRE_WITH_BOARD_I2C_PINS
|
||||
#define BOARD_I2C_SDA 11
|
||||
#define BOARD_I2C_SCL 12
|
||||
|
||||
// Aditional Config
|
||||
#define INTERNAL_LED_PIN 15
|
||||
|
||||
|
|
|
|||
|
|
@ -36,5 +36,10 @@
|
|||
|
||||
#define BUTTON_PIN 21
|
||||
#define INTERNAL_LED_PIN 48
|
||||
|
||||
|
||||
// I2C
|
||||
#define USE_WIRE_WITH_OLED_PINS
|
||||
#define OLED_SDA 5
|
||||
#define OLED_SCL 6
|
||||
|
||||
#endif
|
||||
|
|
@ -30,6 +30,9 @@
|
|||
#define RADIO_WAKEUP_PIN RADIO_BUSY_PIN
|
||||
#define GPIO_WAKEUP_PIN GPIO_SEL_26
|
||||
|
||||
// I2C
|
||||
#define USE_WIRE_WITH_OLED_PINS
|
||||
|
||||
// Display
|
||||
#define HAS_DISPLAY
|
||||
|
||||
|
|
|
|||
|
|
@ -31,6 +31,12 @@
|
|||
#define RADIO_WAKEUP_PIN RADIO_DIO1_PIN
|
||||
#define GPIO_WAKEUP_PIN GPIO_SEL_14
|
||||
|
||||
// I2C
|
||||
#define USE_WIRE_WITH_OLED_PINS
|
||||
#define USE_WIRE1_WITH_BOARD_I2C_PINS
|
||||
#define BOARD_I2C_SDA 41
|
||||
#define BOARD_I2C_SCL 42
|
||||
|
||||
// Display
|
||||
#define HAS_DISPLAY
|
||||
|
||||
|
|
@ -48,7 +54,5 @@
|
|||
#define BATTERY_PIN 1
|
||||
#define VEXT_CTRL 36
|
||||
#define ADC_CTRL 37
|
||||
#define BOARD_I2C_SDA 41
|
||||
#define BOARD_I2C_SCL 42
|
||||
|
||||
#endif
|
||||
|
|
@ -31,6 +31,12 @@
|
|||
#define RADIO_WAKEUP_PIN RADIO_DIO1_PIN
|
||||
#define GPIO_WAKEUP_PIN GPIO_SEL_14
|
||||
|
||||
// I2C
|
||||
#define USE_WIRE_WITH_OLED_PINS
|
||||
#define USE_WIRE1_WITH_BOARD_I2C_PINS
|
||||
#define BOARD_I2C_SDA 41
|
||||
#define BOARD_I2C_SCL 42
|
||||
|
||||
// Display
|
||||
#define HAS_DISPLAY
|
||||
|
||||
|
|
@ -48,7 +54,5 @@
|
|||
#define BATTERY_PIN 1
|
||||
#define VEXT_CTRL 36
|
||||
#define ADC_CTRL 37
|
||||
#define BOARD_I2C_SDA 41
|
||||
#define BOARD_I2C_SCL 42
|
||||
|
||||
#endif
|
||||
|
|
@ -31,6 +31,11 @@
|
|||
#define RADIO_WAKEUP_PIN RADIO_DIO1_PIN
|
||||
#define GPIO_WAKEUP_PIN GPIO_SEL_14
|
||||
|
||||
// I2C
|
||||
#define USE_WIRE1_WITH_BOARD_I2C_PINS
|
||||
#define BOARD_I2C_SDA 37
|
||||
#define BOARD_I2C_SCL 36
|
||||
|
||||
// Display
|
||||
#define HAS_DISPLAY
|
||||
#define HAS_EPAPER
|
||||
|
|
@ -46,7 +51,5 @@
|
|||
#define BATTERY_PIN 20
|
||||
#define ADC_CTRL 19
|
||||
#define VEXT_CTRL 45
|
||||
#define BOARD_I2C_SDA 37
|
||||
#define BOARD_I2C_SCL 36
|
||||
|
||||
#endif
|
||||
|
|
@ -31,6 +31,9 @@
|
|||
#define RADIO_WAKEUP_PIN RADIO_DIO1_PIN
|
||||
#define GPIO_WAKEUP_PIN GPIO_SEL_14
|
||||
|
||||
// I2C
|
||||
#define USE_WIRE_WITH_OLED_PINS
|
||||
|
||||
// Display
|
||||
#define HAS_DISPLAY
|
||||
|
||||
|
|
|
|||
|
|
@ -31,12 +31,15 @@
|
|||
#define RADIO_WAKEUP_PIN RADIO_DIO1_PIN
|
||||
#define GPIO_WAKEUP_PIN GPIO_SEL_14
|
||||
|
||||
// I2C
|
||||
#define USE_WIRE1_WITH_BOARD_I2C_PINS
|
||||
#define BOARD_I2C_SDA 41
|
||||
#define BOARD_I2C_SCL 42
|
||||
|
||||
// Aditional Config
|
||||
#define INTERNAL_LED_PIN 35
|
||||
#define BATTERY_PIN 1
|
||||
#define VEXT_CTRL 36
|
||||
#define ADC_CTRL 37
|
||||
#define BOARD_I2C_SDA 41
|
||||
#define BOARD_I2C_SCL 42
|
||||
|
||||
#endif
|
||||
|
|
@ -31,6 +31,11 @@
|
|||
#define RADIO_WAKEUP_PIN RADIO_DIO1_PIN
|
||||
#define GPIO_WAKEUP_PIN GPIO_SEL_14
|
||||
|
||||
// I2C
|
||||
#define USE_WIRE1_WITH_BOARD_I2C_PINS
|
||||
#define BOARD_I2C_SDA 41
|
||||
#define BOARD_I2C_SCL 42
|
||||
|
||||
// Display
|
||||
#define HAS_DISPLAY
|
||||
#define OLED_RST -1 // Reset pin # (or -1 if sharing Arduino reset pin)
|
||||
|
|
@ -40,7 +45,5 @@
|
|||
#define BATTERY_PIN 1
|
||||
#define VEXT_CTRL 36
|
||||
#define ADC_CTRL 37
|
||||
#define BOARD_I2C_SDA 41
|
||||
#define BOARD_I2C_SCL 42
|
||||
|
||||
#endif
|
||||
|
|
@ -30,6 +30,11 @@
|
|||
#define RADIO_BUSY_PIN 13 // SX1262 BUSY
|
||||
#define RADIO_WAKEUP_PIN RADIO_DIO1_PIN
|
||||
#define GPIO_WAKEUP_PIN GPIO_SEL_14
|
||||
|
||||
// I2C
|
||||
#define USE_WIRE_WITH_BOARD_I2C_PINS
|
||||
#define BOARD_I2C_SDA 7
|
||||
#define BOARD_I2C_SCL 6
|
||||
|
||||
// Display
|
||||
#define HAS_DISPLAY
|
||||
|
|
@ -40,8 +45,6 @@
|
|||
#define BATTERY_PIN 1
|
||||
#define ADC_CTRL 2 // HELTEC Wireless Tracker ADC_CTRL = HIGH powers the voltage divider to read BatteryPin. Only on V05 = V1.1
|
||||
#define VEXT_CTRL 3 // To turn on GPS and TFT
|
||||
#define BOARD_I2C_SDA 7
|
||||
#define BOARD_I2C_SCL 6
|
||||
|
||||
// GPS
|
||||
#define HAS_GPS
|
||||
|
|
|
|||
|
|
@ -30,6 +30,9 @@
|
|||
#define RADIO_WAKEUP_PIN RADIO_BUSY_PIN
|
||||
#define GPIO_WAKEUP_PIN GPIO_SEL_26
|
||||
|
||||
// I2C
|
||||
#define USE_WIRE_WITH_OLED_PINS
|
||||
|
||||
// Display
|
||||
#define HAS_DISPLAY
|
||||
|
||||
|
|
@ -43,7 +46,7 @@
|
|||
|
||||
// Aditional Config
|
||||
#define INTERNAL_LED_PIN 25 // Green Led
|
||||
#define BATTERY_PIN 35
|
||||
#define HAS_ADC_CALIBRATION
|
||||
#define BATTERY_PIN 35
|
||||
#define HAS_ADC_CALIBRATION
|
||||
|
||||
#endif
|
||||
|
|
@ -30,6 +30,9 @@
|
|||
#define RADIO_WAKEUP_PIN RADIO_BUSY_PIN
|
||||
#define GPIO_WAKEUP_PIN GPIO_SEL_26
|
||||
|
||||
// I2C
|
||||
#define USE_WIRE_WITH_OLED_PINS
|
||||
|
||||
// Display
|
||||
#define HAS_DISPLAY
|
||||
|
||||
|
|
|
|||
|
|
@ -31,6 +31,9 @@
|
|||
#define RADIO_WAKEUP_PIN RADIO_DIO1_PIN
|
||||
#define GPIO_WAKEUP_PIN GPIO_SEL_33
|
||||
|
||||
// I2C
|
||||
#define USE_WIRE_WITH_OLED_PINS
|
||||
|
||||
// Display
|
||||
#define HAS_DISPLAY
|
||||
|
||||
|
|
|
|||
|
|
@ -31,6 +31,11 @@
|
|||
#define RADIO_WAKEUP_PIN RADIO_DIO1_PIN
|
||||
#define GPIO_WAKEUP_PIN GPIO_SEL_45
|
||||
|
||||
// I2C
|
||||
#define USE_WIRE_WITH_BOARD_I2C_PINS
|
||||
#define BOARD_I2C_SDA 18
|
||||
#define BOARD_I2C_SCL 8
|
||||
|
||||
// Display
|
||||
#define HAS_DISPLAY
|
||||
#define HAS_TFT
|
||||
|
|
@ -50,7 +55,4 @@
|
|||
#define BOARD_SDCARD_CS 39
|
||||
#define BOARD_BL_PIN 42
|
||||
|
||||
#define BOARD_I2C_SDA 18
|
||||
#define BOARD_I2C_SCL 8
|
||||
|
||||
#endif
|
||||
|
|
@ -31,6 +31,11 @@
|
|||
#define RADIO_WAKEUP_PIN RADIO_DIO1_PIN
|
||||
#define GPIO_WAKEUP_PIN GPIO_SEL_45
|
||||
|
||||
// I2C
|
||||
#define USE_WIRE_WITH_BOARD_I2C_PINS
|
||||
#define BOARD_I2C_SDA 18
|
||||
#define BOARD_I2C_SCL 8
|
||||
|
||||
// Display
|
||||
#define HAS_DISPLAY
|
||||
#define HAS_TFT
|
||||
|
|
@ -51,7 +56,4 @@
|
|||
#define BOARD_SDCARD_CS 39
|
||||
#define BOARD_BL_PIN 42
|
||||
|
||||
#define BOARD_I2C_SDA 18
|
||||
#define BOARD_I2C_SCL 8
|
||||
|
||||
#endif
|
||||
Loading…
Reference in a new issue