Skip to content

Fix esp32-camera support after ESP-IDF v6 upgrade#11059

Merged
dhalbert merged 2 commits into
adafruit:mainfrom
dhalbert:fix-camera-support-idf-6
Jun 19, 2026
Merged

Fix esp32-camera support after ESP-IDF v6 upgrade#11059
dhalbert merged 2 commits into
adafruit:mainfrom
dhalbert:fix-camera-support-idf-6

Conversation

@dhalbert

Copy link
Copy Markdown
Collaborator

Before ESP-IDF v6.0, the espcamera API shared the I2C bus that CircuitPython had already created, by passing its handle to esp-camera:

self->camera_config.sccb_i2c_master_bus_handle = self->i2c->handle;

The bus handle went away in recent version of esp32-camera, so the sharing needed to happen a different way. busio/I2C.c was changed to record the port of a created I2C object, and that port is now passed to esp32-camera:

self->camera_config.sccb_i2c_port = i2c->port;

Before this change, esp32-camera created a second I2C instance on the same pins, which caused the I2C device known to CircuitPython to be different from the one used by esp32-camera.

I also updated the esp32-camera submodule to v2.1.7 on the adafruit fork, merging in our changes. I removed some additions we had made because some equivalent changes were made upstream.

I tested on a Memento, which now works fine and takes pictures.

Claude Code helped with this diagnosis and fix. I thought it might be an issue with SCCB support due to I2C driver changes, but that was incorrect.

@dhalbert dhalbert requested a review from FoamyGuy June 19, 2026 01:27

@FoamyGuy FoamyGuy left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good to me, I tested the artifact successfully on memento with camera code. Thanks for the fixes!

@dhalbert dhalbert merged commit 8596a5a into adafruit:main Jun 19, 2026
776 of 794 checks passed
@dhalbert dhalbert deleted the fix-camera-support-idf-6 branch June 19, 2026 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Memento camera init fails on latest builds

2 participants