Skip to content
This repository was archived by the owner on Nov 5, 2026. It is now read-only.

Add CoreS3 hardware support: touch, IMU rotation, battery, power - #39

Closed
grimwiz wants to merge 2 commits into
m5stack:mainfrom
grimwiz:cores3-hardware-support
Closed

grimwiz wants to merge 2 commits into
m5stack:mainfrom
grimwiz:cores3-hardware-support

Conversation

@grimwiz

@grimwiz grimwiz commented Jun 28, 2026

Copy link
Copy Markdown

Depends on #37 (the CoreS3 voice config this builds on). Until #37 merges, the Files changed view shows the whole config file, because it isn't in main yet — please read it commit-by-commit, and I'll rebase to a clean diff the moment #37 lands.

Adapts the CoreS3 voice config (#37) to the board's hardware, as one cohesive change (the features are interdependent — touch uses the IMU orientation, power management uses the battery sensors):

  • Touch controls — the CoreS3 lacks the S3-BOX-3's GPIO0 button, so the FT6336 touchscreen stands in: tap = stop, ~1 s hold = push-to-talk, 5 idle taps open a swipe-to-reset factory-reset screen. Touch is polled (the FT6336 INT is on the AW9523 expander, not an ESP32 GPIO — so it can't drive an ESPHome touchscreen interrupt), which means brief taps can be missed; documented in-config.
  • IMU auto-rotation — BMI270 gravity sense flips the display 0°/180°.
  • Battery widget — AXP2101 battery glyph on the idle screen.
  • Power management — the AW88298 amp is powered on only for playback/alarms and dropped when idle; backlight dimmed on battery.

🤖 Generated with Claude Code

grimwiz and others added 2 commits June 26, 2026 15:03
Ports ESPHome's esp32-s3-box-3 voice-assistant config (Apache-2.0) to the
M5Stack CoreS3: the voice / display / timer logic is unchanged, only the
hardware layer is swapped (AXP2101 PMU + AW9523B expander, ES7210 mic,
AW88298 amp, M5CORE display). Adds the aw88298 class-D amp component.

Complements the existing arduino + server-side voice-assistant/m5stack-cores3.yaml
with an esp-idf, on-device microWakeWord variant.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Adapts the parity port to the CoreS3's hardware, as one cohesive change (the features are interdependent — touch uses the IMU orientation, power management uses the battery sensors):

- Touch controls: the CoreS3 lacks the S3-BOX's GPIO0 button, so the FT6336 touchscreen stands in — tap = stop, ~1 s hold = push-to-talk, 5 idle taps open a swipe-to-reset factory-reset screen. Touch is polled (its INT is on the AW9523 expander, not a GPIO), so brief taps can be missed; noted in-config.
- IMU auto-rotation: BMI270 gravity sense flips the display 0/180.
- Battery widget: AXP2101 battery glyph on the idle screen.
- Power management: the AW88298 amp is powered only for playback and alarms and dropped when idle on battery; backlight dimmed on battery.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@imliubo
imliubo requested a review from Harrison-Xu June 29, 2026 01:58
@lboue

lboue commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Please use the new repo esphome-yaml instead.

@grimwiz

grimwiz commented Jun 30, 2026

Copy link
Copy Markdown
Author

Thanks @lboue! Happy to move this to m5stack/esphome-yaml. I can see it already has common/cores3-satellite-base.yaml and the aw9523b / axp2101 / aw88298 components, so I'll rebase the CoreS3 hardware support from this PR — touch, IMU rotation, battery and power — onto that structure and open a fresh PR there, then close this one. Thanks for pointing me to the new home.

@grimwiz

grimwiz commented Jul 1, 2026

Copy link
Copy Markdown
Author

Closing: the new m5stack/esphome-yaml repo now covers most of this (AXP2101 battery/power, FT63x6 touch incl. the AW9523 P1_2 touch-INT). The one piece it lacks — the BMI270 gravity-based screen rotation — I'm resubmitting there as a focused PR.

@grimwiz grimwiz closed this Jul 1, 2026
grimwiz added a commit to grimwiz/esphome-yaml that referenced this pull request Jul 2, 2026
…I270)

Optional include alongside cores3-satellite-base.yaml: reads the on-board
BMI270 (native ESPHome motion hub, 0x69 on bsp_bus) and flips the display
between the two landscape orientations from the in-plane gravity sign, with
a 0.30 g deadzone so a flat device keeps its current orientation. mipi_spi
applies set_rotation at runtime, so the flip is just a redraw.

Rotation logic hardware-proven on a CoreS3-Lite; this packaging compiles
clean against cores3-satellite-base.yaml (esphome 2026.6.4).

Supersedes the IMU-rotation part of m5stack/M5CoreS3-Esphome#39.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants