Skip to content

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

Open
dhalbert wants to merge 2 commits into
adafruit:mainfrom
dhalbert:fix-camera-support-idf-6
Open

Fix esp32-camera support after ESP-IDF v6 upgrade#11059
dhalbert wants to merge 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.

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

1 participant