xTaskCreatePinnedToCore() for I2S audio.wifi_scanner via the built-in WiFi.h library — no extra hardware needed. BLE available but not used in the current sketches./dev/cu.wchusbserial* (macOS) or /dev/ttyUSB* (Linux) after installing the WCH driver. Used by esptool.py for flashing.Driven via HSPI. The TFT_eSPI library handles all drawing — filled rects, rounded rects, text, lines, and sprites. The User_Setup.h file configures pin assignments for this board.
MOSI=20 SCLK=21 DC=0 CS=GND
Used in every sketch. The TFT_eSprite class creates off-screen buffers that push to the display in one DMA write — critical for the heartbeat ECG waveform (zero flicker).
Shares the I2C bus with the MAX30102 heart rate sensor. Returns touch point coordinates via FT6336U_TouchPointType. The library is a custom Freenove build, not in the official Arduino registry — the flash scripts download it directly from their GitHub.
SDA=2 SCL=1
Used in beep_button (tap to toggle), heartbeat_viz (tap to freeze), pixel_canvas (draw + toolbar), lie_detector (YES/NO buttons).
Uses the ESP-IDF driver/i2s_std.h API (v5.x). The legacy driver/i2s.h is deprecated in Arduino core 3.x. Audio is generated in software — sine waves for the beep, exponentially-decaying sine for the bell, and pulsed square waves for the buzzer.
BCLK=42 LRC=14 DOUT=41
Audio tasks are pinned to Core 0 via FreeRTOS to prevent the UI loop from starving the audio DMA buffer.
Red + IR LED pulse oximeter. Shares the I2C bus with the FT6336U touch controller. Uses SparkFun MAX3010x library. IR readings above 50,000 ADC counts indicate a finger is present.
SDA=2 SCL=1
AC-coupled via exponential moving average baseline removal. Beat detection via the library's checkForBeat(). BPM averaged over 8 beats. Used in heartbeat_viz and lie_detector.
Hardware SDMMC peripheral (not bit-banged SPI). Uses ESP32's built-in SD_MMC library. Operates in 1-bit mode to avoid pin conflicts. FAT32 formatted cards up to 32 GB work reliably.
CMD=38 CLK=39 D0=40
Used in pixel_canvas to save 30×30 pixel paintings as 24-bit BMP files. Files auto-numbered canvas_001.bmp … canvas_999.bmp.
2-megapixel CMOS image sensor with onboard JPEG compression. Supports up to 1600×1200 (UXGA) resolution in JPEG mode, or lower resolutions at higher frame rates.
Connected via the ESP32-S3's parallel camera interface (DVP). Uses the ESP32 Camera library from Espressif.
Not yet used in the current sketches — future project: stream JPEG frames over WiFi to a browser.
SDA=2, SCL=1. Both operate fine at I2C_SPEED_FAST (400 kHz). Always call Wire.begin(2, 1) once in setup().
| GPIO | Peripheral | Signal | Used in sketches |
|---|---|---|---|
| 0 | ST7789 LCD | DC (data/command) | all TFT sketches |
| 1 | I2C bus | SCL | heartbeat_viz, lie_detector, beep_button, pixel_canvas |
| 2 | I2C bus | SDA | heartbeat_viz, lie_detector, beep_button, pixel_canvas |
| 14 | I2S amplifier | LRC (word select) | beep_button, lie_detector |
| 20 | ST7789 LCD | MOSI (SPI data) | all TFT sketches |
| 21 | ST7789 LCD | SCLK (SPI clock) | all TFT sketches |
| 38 | SDMMC | CMD | pixel_canvas |
| 39 | SDMMC | CLK | pixel_canvas |
| 40 | SDMMC | D0 (data) | pixel_canvas |
| 41 | I2S amplifier | DOUT (audio data) | beep_button, lie_detector |
| 42 | I2S amplifier | BCLK (bit clock) | beep_button, lie_detector |
| GND | ST7789 LCD | CS (chip select) | all TFT sketches — CS tied to GND (always selected) |
esp32:esp32:esp32s3:USBMode=hwcdc,CDCOnBoot=cdc,FlashSize=8M,PSRAM=opi
Key options: USBMode=hwcdc — enables the hardware USB-CDC port (the WCH chip). CDCOnBoot=cdc — Serial output appears on USB immediately at boot. FlashSize=8M — uses the full 8 MB flash partition table. PSRAM=opi — enables OPI PSRAM (required for TFT_eSprite with large buffers).
| Sketch | Peripherals used | Libraries |
|---|---|---|
| beep_button | TFT_eSPI, FT6336U, driver/i2s_std.h | |
| lie_detector | TFT_eSPI, FT6336U, MAX30105, heartRate, i2s_std | |
| dvd_screensaver | TFT_eSPI only | |
| heartbeat_viz | TFT_eSPI, TFT_eSprite, FT6336U, MAX30105, heartRate | |
| pixel_canvas | TFT_eSPI, FT6336U, SD_MMC | |
| wifi_scanner | TFT_eSPI, WiFi.h (built-in) |