Skip to content

daich/bbTalkie-waveshare-LCD154

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

120 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bbTalkie — Waveshare ESP32-S3-LCD-1.54 Port

This is a branch of RealCorebb/bbTalkie ported to run on the Waveshare ESP32-S3-LCD-1.54 development board.


What changed

Subsystem Original bbTalkie Waveshare ESP32-S3-LCD-1.54
Display SSD1327 128×128 OLED (SPI2) ST7789 240×240 LCD (SPI2)
Display pins MOSI=14, SCK=13, CS=10, DC=12, RST=11 MOSI=39, SCK=38, CS=21, DC=45, RST=40
Backlight n/a IO46 (GPIO high = on)
Audio input Custom codec (I2S_NUM_1, LRCK=1, SCLK=2, SDIN=17) ES7210 dual-mic ADC (I2S_NUM_0, MCLK=8, SCLK=9, LRCK=10, SDIN=12)
Audio output Custom codec (DOUT=18) ES8311 DAC + NS4150B amp (DOUT=11), PA_CTRL=7
Codec I2C config n/a (codec was digital-only) ES7210 + ES8311 over I2C_NUM_0 (SCL=41, SDA=42)
Action button GPIO8 (BOOT) GPIO4 (KEY_PLUS)
Extra buttons n/a GPIO0 (KEY_MINUS), GPIO5 (KEY_PWR)
Battery ADC GPIO7 / ADC1_CH6 GPIO1 / ADC1_CH0 (BAT_ADC)
Battery enable n/a GPIO2 (BAT_EN, active high)
Charger stat GPIO4, GPIO5 GPIO3 (CHG_STAT, input)
RGB LED WS2812 on GPIO15 No LED (stubbed to no-op; LCD shows state)
SD card SDMMC 1-bit, CLK=39, CMD=38, D0=40 SDMMC 4-bit, CLK=16, CMD=15, D0-D3=17/18/13/14
IMU n/a QMI8658 on I2C (INT=GPIO6) — not yet used
Touch n/a CST816 on I2C (RST=47, INT=48) — not yet used

The application logic (ESP-NOW walkie-talkie, ESP-SR VAD + wake-word, ADPCM codec, display animations, speech bubble text) is unchanged.


Building

Prerequisites

  • ESP-IDF v5.4.3 (same as original bbTalkie)
  • The esp-sr component (ESP speech recognition) — already in the project

Pin mapping reference

IO Signal Direction Notes
IO0 KEY_MINUS Input PU Button, active low
IO1 BAT_ADC Analog in ADC1_CH0, through voltage divider
IO2 BAT_EN Output High = enable battery ADC divider
IO3 CHG_STAT Input Charger status (do not drive)
IO4 KEY_PLUS Input PU Main action button (active low)
IO5 KEY_PWR Input PU Power button (active low)
IO6 IMU_INT Input QMI8658 interrupt (unused by bbTalkie)
IO7 CODEC_PA_CTRL Output NS4150B power-amp enable, active high
IO8 I2S_MCLK Output Shared ES7210 + ES8311 master clock
IO9 I2S_SCLK Output Bit clock
IO10 I2S_LRCK Output Word select / LR clock
IO11 I2S_ASDOUT Output ESP32 → ES8311 DAC data
IO12 I2S_DSDIN Input ES7210 ADC → ESP32 mic data
IO13 SD_D2 I/O SDMMC 4-bit bus
IO14 SD_D3 I/O SDMMC 4-bit bus
IO15 SD_CMD I/O SDMMC command
IO16 SD_CLK Output SDMMC clock
IO17 SD_D0 I/O SDMMC 4-bit bus
IO18 SD_D1 I/O SDMMC 4-bit bus
IO19 USB_N USB D- (do not use as GPIO)
IO20 USB_P USB D+ (do not use as GPIO)
IO21 LCD_CS Output ST7789 chip select
IO38 LCD_CLK Output ST7789 SPI clock
IO39 LCD_DIN Output ST7789 MOSI
IO40 LCD_RST Output ST7789 reset (active low)
IO41 SCL I/O Shared I2C: ES7210, ES8311, QMI8658, CST816
IO42 SDA I/O Shared I2C bus
IO43 ESP_TXD Output UART0 TX (debug)
IO44 ESP_RXD Input UART0 RX (debug)
IO45 LCD_DC Output ST7789 data/command select
IO46 LCD_BL Output Backlight (high = on)
IO47 TP_RST Output CST816 touch reset (unused by bbTalkie)
IO48 TP_INT Input CST816 touch interrupt (unused by bbTalkie)

Known limitations / TODO

  1. Display driver: The original code uses the SSD1327 128×128 OLED driver (esp32-spi-ssd1327). The Waveshare board has a ST7789 240×240 colour LCD. The BSP and SPI bus wiring is updated, but you need to replace the SSD1327 driver with an ST7789 driver (e.g. esp_lcd_st7789 from idf-component-manager). Alternatively use LVGL with the ESP LCD component. All drawing calls in main.c target the spi_ssd1327 struct — these need mapping to the new driver's API.

  2. LED feedback: The WS2812 RGB LED is absent. Status feedback is via the LCD display only. If you add an external WS2812, set #define WS2812_AVAILABLE 1 in include/led.h and set WS2812_GPIO_PIN to a free GPIO.

  3. Touch: The CST816 capacitive touch controller is not initialised. Add it over I2C if needed.

  4. IMU: The QMI8658 6-axis IMU is present on I2C but not initialised. Useful for tilt-to-talk.

  5. ES7210 AEC: The ES7210 supports hardware echo cancellation with the ES8311 loopback. The current bsp_get_input_format() returns "RM" (Reference + Mic). Verify the channel order with a logic analyser and adjust the >> shift in bsp_get_feed_data() if needed.


Credits

Original bbTalkie by Corebb — MIT licence. Waveshare port by daich

About

A hands-free mini walkie-talkie powered by embedded AI, featuring automatic voice detection, keyword-triggered animations, and real-time speech-to-text display.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • C 99.3%
  • Other 0.7%