Skip to content

feat(xiao-esp32-s3-sense): Add XIAO ESP32 S3 Sense BSP component, example streams audio/video using RTSP component#634

Merged
finger563 merged 5 commits into
mainfrom
feat/xiao-esp32-s3-sense
Jun 9, 2026
Merged

feat(xiao-esp32-s3-sense): Add XIAO ESP32 S3 Sense BSP component, example streams audio/video using RTSP component#634
finger563 merged 5 commits into
mainfrom
feat/xiao-esp32-s3-sense

Conversation

@finger563

@finger563 finger563 commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Description

This PR adds support for the Seeed Studio XIAO ESP32S3 Sense as a new ESPP BSP
component and provides a streamer-style RTSP example for the board.

The new espp::XiaoEsp32S3Sense component exposes the documented hardware
mapping for the board, including:

  • OV2640 camera pins
  • onboard PDM microphone pins
  • user LED helpers with Gaussian breathing support
  • microSD card SPI pins
  • default ESP-IDF PDM RX microphone configuration helpers

The example was updated to act as a compact RTSP camera/audio streamer for the
XIAO ESP32S3 Sense, serving:

  • MJPEG video from the OV2640 camera
  • mono PCM audio from the onboard PDM microphone

This PR also includes the supporting example configuration and RTSP integration
work needed to run the XIAO example cleanly, along with follow-up safety and
resilience fixes from review:

  • guard start_led_breathing() when LED/task initialization has not occurred
  • guard stop_led_breathing() when LED/task initialization has not occurred
  • add a short interruptible backoff when esp_camera_fb_get() returns nullptr
  • add a short interruptible backoff when dropping invalid JPEG frames

Motivation and Context

This change adds first-class support for the XIAO ESP32S3 Sense in ESPP and
provides a practical reference application for using the board as a compact RTSP
streaming endpoint.

It solves a few problems:

  • there was no dedicated BSP for the XIAO ESP32S3 Sense board
  • there was no board-specific example showing combined camera + microphone RTSP
    streaming on this hardware
  • the example needed additional hardening around LED helper usage and repeated
    camera capture failures under error conditions

How has this been tested?

The changes were tested by building the XIAO example with ESP-IDF on esp32s3:

  • components/xiao-esp32s3-sense/example

The branch work was also exercised through the RTSP streaming flow by using the
XIAO hardware with the Python RTSP client / multitrack client path to verify
camera streaming and onboard microphone audio capture.

Follow-up review fixes were validated by rebuilding the XIAO example after the
LED guard and camera backoff changes.

Screenshots (if appropriate, e.g. schematic, board, console logs, lab pictures):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update
  • Hardware (schematic, board, system design) change
  • Software change

Checklist:

  • My change requires a change to the documentation.
  • I have added / updated the documentation related to this change via either README or WIKI

Software

  • I have added tests to cover my changes.
  • I have updated the .github/workflows/build.yml file to add my new test to the automated cloud build github action.
  • All new and existing tests passed.
  • My code follows the code style of this project.

…mple streams audio/video using RTSP component
Copilot AI review requested due to automatic review settings June 8, 2026 17:14
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown

✅Static analysis result - no issues found! ✅

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a new Board Support Package (BSP) component for the Seeed Studio XIAO ESP32S3 Sense and adds an ESP-IDF example application that streams OV2640 MJPEG video plus PDM-microphone PCM audio over RTSP, along with initial Sphinx documentation pages for the component.

Changes:

  • Added espp::XiaoEsp32S3Sense BSP component with pin mappings, LED breathing helpers, and default ESP-IDF PDM RX config builders.
  • Added an RTSP “camera streamer” example project (camera + mic capture, RTSP server, mDNS advertisement, CLI + memory monitoring).
  • Added initial Sphinx docs pages to document the component and include the example README.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
doc/en/xiao_esp32s3_sense.rst New Sphinx page describing the XIAO ESP32S3 Sense BSP and linking to example + API include.
doc/en/xiao_esp32s3_sense_example.md Includes the example README into the docs build.
components/xiao-esp32s3-sense/CMakeLists.txt Registers the new BSP as an ESP-IDF component (include/src + dependencies + target).
components/xiao-esp32s3-sense/README.md Component README describing hardware and exposed helpers.
components/xiao-esp32s3-sense/include/xiao-esp32s3-sense.hpp Public API for pin mappings, LED control, and PDM RX config helpers.
components/xiao-esp32s3-sense/src/xiao-esp32s3-sense.cpp Implementation of pin mapping accessors, LED breathing task, and PDM config builders.
components/xiao-esp32s3-sense/idf_component.yml Component Manager manifest for the new BSP component.
components/xiao-esp32s3-sense/example/CMakeLists.txt ESP-IDF example project CMake configuring component directories and project name.
components/xiao-esp32s3-sense/example/README.md Example documentation (configuration, build/flash, RTSP URL and tracks).
components/xiao-esp32s3-sense/example/partitions.csv Custom partition table for the example (factory + littlefs).
components/xiao-esp32s3-sense/example/sdkconfig.defaults Example defaults tuned for ESP32-S3 + camera/RTSP (PSRAM, stacks, lwIP/WiFi).
components/xiao-esp32s3-sense/example/main/CMakeLists.txt Registers the example “main” component and its REQUIRES list.
components/xiao-esp32s3-sense/example/main/idf_component.yml Example-level component dependencies (mdns, esp32-camera, espp components via override_path).
components/xiao-esp32s3-sense/example/main/Kconfig.projbuild Menuconfig options for RTSP port, task stacks, and WiFi credentials/retry.
components/xiao-esp32s3-sense/example/main/xiao_esp32s3_sense_example.cpp Full streamer application: WiFi STA, RTSP server setup, camera + microphone capture tasks, mDNS.

Comment thread components/xiao-esp32s3-sense/CMakeLists.txt
Comment thread components/xiao-esp32s3-sense/src/xiao-esp32s3-sense.cpp
Comment thread components/xiao-esp32s3-sense/src/xiao-esp32s3-sense.cpp Outdated
@finger563 finger563 self-assigned this Jun 8, 2026
@finger563 finger563 added enhancement New feature or request xiao esp32 s3 sense labels Jun 8, 2026
@finger563 finger563 merged commit eb96f67 into main Jun 9, 2026
110 of 112 checks passed
@finger563 finger563 deleted the feat/xiao-esp32-s3-sense branch June 9, 2026 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants