|
| 1 | +# LilyGo T-Deck Pro E-Paper - Bruce Firmware |
| 2 | + |
| 3 | +⚠️ **EXPERIMENTAL SUPPORT** ⚠️ |
| 4 | + |
| 5 | +This board configuration is experimental and has significant limitations due to the E-Paper display. |
| 6 | + |
| 7 | +## Hardware Specifications |
| 8 | + |
| 9 | +- **MCU**: ESP32-S3FN16R8 (16MB Flash, 8MB PSRAM) |
| 10 | +- **Display**: GDEQ031T10 (3.1" E-Paper, 320x240, UC8253 controller) |
| 11 | +- **Touch**: CST328 capacitive touch controller (I2C 0x1A) |
| 12 | +- **Keyboard**: TCA8418 QWERTY keyboard controller (I2C 0x34) |
| 13 | +- **LoRa**: SX1262 (915/868 MHz) |
| 14 | +- **GPS**: MIA-M10Q (UART) |
| 15 | +- **4G Modem**: A7682E LTE Cat 1 (optional) |
| 16 | +- **Battery**: 1400mAh LiPo with BQ25896 charger and BQ27220 fuel gauge |
| 17 | +- **Gyroscope**: BHI260AP (I2C 0x28) |
| 18 | +- **SD Card**: MicroSD slot (SPI) |
| 19 | + |
| 20 | +## Pin Configuration |
| 21 | + |
| 22 | +### Display (E-Paper) |
| 23 | +- **MOSI**: GPIO 33 |
| 24 | +- **SCK**: GPIO 36 |
| 25 | +- **CS**: GPIO 34 |
| 26 | +- **DC**: GPIO 35 |
| 27 | +- **BUSY**: GPIO 37 |
| 28 | +- **RST**: Not connected (-1) |
| 29 | + |
| 30 | +### Touch (CST328) |
| 31 | +- **SDA**: GPIO 13 |
| 32 | +- **SCL**: GPIO 14 |
| 33 | +- **INT**: GPIO 12 |
| 34 | +- **RST**: GPIO 45 |
| 35 | + |
| 36 | +### Keyboard (TCA8418) |
| 37 | +- **SDA**: GPIO 13 |
| 38 | +- **SCL**: GPIO 14 |
| 39 | +- **INT**: GPIO 15 |
| 40 | +- **LED**: GPIO 42 |
| 41 | + |
| 42 | +### LoRa (SX1262) |
| 43 | +- **MOSI**: GPIO 33 |
| 44 | +- **MISO**: Not used |
| 45 | +- **SCK**: GPIO 36 |
| 46 | +- **CS**: GPIO 3 |
| 47 | +- **RST**: GPIO 4 |
| 48 | +- **DIO1**: GPIO 5 |
| 49 | +- **BUSY**: GPIO 6 |
| 50 | + |
| 51 | +### SD Card |
| 52 | +- **MOSI**: GPIO 33 |
| 53 | +- **SCK**: GPIO 36 |
| 54 | +- **CS**: GPIO 48 |
| 55 | + |
| 56 | +### GPS (MIA-M10Q) |
| 57 | +- **TX**: GPIO 16 |
| 58 | +- **RX**: GPIO 17 |
| 59 | +- **Baud Rate**: 9600 |
| 60 | + |
| 61 | +### Power |
| 62 | +- **Power Control**: GPIO 10 |
| 63 | +- **Battery ADC**: GPIO 4 |
| 64 | + |
| 65 | +## Known Limitations |
| 66 | + |
| 67 | +### E-Paper Display Limitations |
| 68 | + |
| 69 | +1. **Slow Refresh Rate**: E-Paper displays take 1-2 seconds to fully refresh |
| 70 | + - Bruce's UI expects fast TFT refresh rates |
| 71 | + - Menus and animations will be very slow and choppy |
| 72 | + - Not suitable for real-time operations |
| 73 | + |
| 74 | +2. **Ghosting**: E-Paper displays show ghosting effects |
| 75 | + - Previous images may remain faintly visible |
| 76 | + - Full screen refreshes needed periodically |
| 77 | + |
| 78 | +3. **Monochrome Only**: E-Paper is black and white |
| 79 | + - No color support (Bruce UI uses colors extensively) |
| 80 | + - Reduced visual feedback |
| 81 | + |
| 82 | +4. **No Backlight**: E-Paper has no backlight |
| 83 | + - Needs external light to be readable |
| 84 | + - Brightness controls do nothing |
| 85 | + |
| 86 | +### Current Implementation Status |
| 87 | + |
| 88 | +✅ **Working:** |
| 89 | +- Touch input (CST328) |
| 90 | +- Basic GPIO setup |
| 91 | +- Power management |
| 92 | +- SD Card support |
| 93 | +- LoRa module support |
| 94 | + |
| 95 | +⚠️ **Partially Working:** |
| 96 | +- Display output (using TFT_eSPI with ST7789 driver as placeholder) |
| 97 | + - **CRITICAL**: E-Paper requires GxEPD2 library, not TFT_eSPI |
| 98 | + - Current config will NOT work correctly with E-Paper |
| 99 | + - This is a temporary workaround for compilation |
| 100 | + |
| 101 | +❌ **Not Implemented:** |
| 102 | +- Keyboard input (TCA8418 needs proper driver library) |
| 103 | +- 4G Modem (A7682E not supported in Bruce) |
| 104 | +- Gyroscope (BHI260AP not used in Bruce) |
| 105 | +- Battery fuel gauge (BQ27220 reading) |
| 106 | +- Charger status (BQ25896 reading) |
| 107 | + |
| 108 | +## Required Changes for Full E-Paper Support |
| 109 | + |
| 110 | +To properly support the E-Paper display, the following major changes are needed: |
| 111 | + |
| 112 | +1. **Replace TFT_eSPI with GxEPD2** |
| 113 | + - Add `zinggjm/GxEPD2` library dependency |
| 114 | + - Create wrapper layer to adapt GxEPD2 API to Bruce's display API |
| 115 | + - Implement partial refresh strategies to improve performance |
| 116 | + |
| 117 | +2. **Optimize UI for E-Paper** |
| 118 | + - Reduce refresh frequency |
| 119 | + - Simplify animations |
| 120 | + - Use partial refreshes where possible |
| 121 | + - Convert color schemes to high-contrast B&W |
| 122 | + |
| 123 | +3. **Add TCA8418 Keyboard Driver** |
| 124 | + - Implement full TCA8418 driver or add library dependency |
| 125 | + - Map keyboard matrix to ASCII codes |
| 126 | + - Handle function keys and modifiers |
| 127 | + |
| 128 | +4. **Add Battery Management** |
| 129 | + - Implement BQ27220 fuel gauge reading |
| 130 | + - Implement BQ25896 charger status |
| 131 | + - Proper battery percentage calculation |
| 132 | + |
| 133 | +## Building |
| 134 | + |
| 135 | +```bash |
| 136 | +pio run -e lilygo-t-deck-pro-epaper |
| 137 | +``` |
| 138 | + |
| 139 | +## Flashing |
| 140 | + |
| 141 | +```bash |
| 142 | +pio run -e lilygo-t-deck-pro-epaper -t upload |
| 143 | +``` |
| 144 | + |
| 145 | +## Recommendations |
| 146 | + |
| 147 | +**For Production Use:** |
| 148 | +- Consider using the regular T-Deck or T-Deck Plus with TFT display |
| 149 | +- Bruce is optimized for fast TFT displays, not E-Paper |
| 150 | +- E-Paper support would require significant UI redesign |
| 151 | + |
| 152 | +**For Testing:** |
| 153 | +- This configuration can be used to test non-display features |
| 154 | +- Keyboard, LoRa, GPS, and other peripherals should work |
| 155 | +- Display will be slow but functional for basic menu navigation |
| 156 | + |
| 157 | +## References |
| 158 | + |
| 159 | +- [LilyGo T-Deck Pro GitHub](https://github.com/Xinyuan-LilyGO/T-Deck-Pro) |
| 160 | +- [LilyGo T-Deck Pro Wiki](https://wiki.lilygo.cc/get_started/en/Wearable/T-Deck-Pro/T-Deck-Pro.html) |
| 161 | +- [GxEPD2 Library](https://github.com/ZinggJM/GxEPD2) |
| 162 | +- [Bruce Firmware](https://github.com/pr3y/Bruce) |
| 163 | + |
| 164 | +## Contributing |
| 165 | + |
| 166 | +If you want to improve E-Paper support: |
| 167 | +1. Implement GxEPD2 wrapper layer |
| 168 | +2. Add TCA8418 keyboard library |
| 169 | +3. Optimize UI for E-Paper refresh rates |
| 170 | +4. Test and submit pull request |
| 171 | + |
| 172 | +--- |
| 173 | + |
| 174 | +**Note**: This is an experimental configuration. Use at your own risk. |
0 commit comments