From b27b475d3c75492f2d96003fd6201e944a8b24b1 Mon Sep 17 00:00:00 2001 From: agessaman Date: Fri, 7 Aug 2026 15:12:17 -0700 Subject: [PATCH] feat(variants): add I2C sensor pins to Heltec/RAK3112 observers Match Heltec_v3_sensor and RAK_3112_sensor Wire1 pins (33/34) so external sensors work on observer_mqtt builds. --- variants/heltec_v3/platformio.ini | 6 ++++++ variants/rak3112/platformio.ini | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/variants/heltec_v3/platformio.ini b/variants/heltec_v3/platformio.ini index 305d5782..039126bb 100644 --- a/variants/heltec_v3/platformio.ini +++ b/variants/heltec_v3/platformio.ini @@ -109,6 +109,7 @@ lib_deps = [env:Heltec_v3_repeater_observer_mqtt] extends = Heltec_lora32_v3 upload_port = /dev/cu.usbserial-4 +; External I2C sensors (BMP280 etc.) on header pins 33/34, same as the Heltec_v3_sensor env extra_scripts = ${esp32_base.extra_scripts} pre:scripts/generate_cert_bundle.py @@ -143,6 +144,8 @@ build_flags = # -D MQTT_PORT=1883 # -D MQTT_USERNAME='"your-username"' # -D MQTT_PASSWORD='"your-password"' + -D ENV_PIN_SDA=33 + -D ENV_PIN_SCL=34 build_src_filter = ${Heltec_lora32_v3.build_src_filter} + + @@ -191,6 +194,7 @@ lib_deps = [env:Heltec_v3_room_server_observer_mqtt] extends = Heltec_lora32_v3 +; External I2C sensors (BMP280 etc.) on header pins 33/34, same as the Heltec_v3_sensor env extra_scripts = ${esp32_base.extra_scripts} pre:scripts/generate_cert_bundle.py @@ -217,6 +221,8 @@ build_flags = -D ESP32_CPU_FREQ=160 -D MQTT_WIFI_TX_POWER=WIFI_POWER_11dBm -D WITH_SNMP=1 + -D ENV_PIN_SDA=33 + -D ENV_PIN_SCL=34 build_src_filter = ${Heltec_lora32_v3.build_src_filter} + + diff --git a/variants/rak3112/platformio.ini b/variants/rak3112/platformio.ini index 6cc8b914..36432af4 100644 --- a/variants/rak3112/platformio.ini +++ b/variants/rak3112/platformio.ini @@ -100,6 +100,7 @@ lib_deps = [env:RAK_3112_repeater_observer_mqtt] extends = rak3112 +; External I2C sensors on pins 33/34, same as the RAK_3112_sensor env extra_scripts = ${esp32_base.extra_scripts} pre:scripts/generate_cert_bundle.py @@ -130,6 +131,8 @@ build_flags = # -D MQTT_PORT=1883 # -D MQTT_USERNAME='"your-username"' # -D MQTT_PASSWORD='"your-password"' + -D ENV_PIN_SDA=33 + -D ENV_PIN_SCL=34 build_src_filter = ${rak3112.build_src_filter} + + @@ -165,6 +168,7 @@ lib_deps = [env:RAK_3112_room_server_observer_mqtt] extends = rak3112 +; External I2C sensors on pins 33/34, same as the RAK_3112_sensor env extra_scripts = ${esp32_base.extra_scripts} pre:scripts/generate_cert_bundle.py @@ -190,6 +194,8 @@ build_flags = -D ESP32_CPU_FREQ=160 -D MQTT_WIFI_TX_POWER=WIFI_POWER_11dBm -D WITH_SNMP=1 + -D ENV_PIN_SDA=33 + -D ENV_PIN_SCL=34 build_src_filter = ${rak3112.build_src_filter} + +