Fixes #1183 — T-Echo Lite incorrect battery voltage + headless env support#2287
Open
pelgraine wants to merge 1 commit intomeshcore-dev:devfrom
Open
Fixes #1183 — T-Echo Lite incorrect battery voltage + headless env support#2287pelgraine wants to merge 1 commit intomeshcore-dev:devfrom
pelgraine wants to merge 1 commit intomeshcore-dev:devfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The T-Echo Lite variant files were copied from the T-Echo without adapting to the Lite's different hardware. Three issues fixed, plus build environments added for the screenless Core variant.
Battery (TechoBoard.h/cpp): Added PIN_VBAT_MEAS_EN (P0.31) — the T-Echo Lite has a gated voltage divider that must be enabled before reading. Also added pinMode(PIN_VBAT_READ, INPUT) before each ADC read to reclaim P0.02 from other peripherals. Pin definitions hardcoded from LilyGo's t_echo_lite_config.h.
I2C (variant.h): Corrected SDA/SCL from P0.04/P0.02 to P1.04/P1.02 per LilyGo's IIC_1_SDA/IIC_1_SCL. The old P0.02 mapping conflicted with the battery ADC pin.
GPS (variant.h): Corrected all five GPS pin assignments to match LilyGo's config — UART TX/RX, wake, PPS, and power enable were all scrambled.
Headless builds (platformio.ini): Added LilyGo_T-Echo-Lite-Core base config and LilyGo_T-Echo-Lite-Core_repeater / LilyGo_T-Echo-Lite-Core_companion_radio_ble environments for the screenless T-Echo Lite variants — strips display-related flags, source files, and GxEPD2 dependency.
Tested on T-Echo Lite Base (screenless):

Battery readings now match Heltec V4 comparison reference within 10mV - Heltec v4 read partially discharged battery as 3.51v, screenshots of T-Echo Lite readings below: