Skip to content

How to integrate USER_C_MODULES into this project #314

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
hcwang opened this issue Mar 19, 2025 · 0 comments
Open

How to integrate USER_C_MODULES into this project #314

hcwang opened this issue Mar 19, 2025 · 0 comments

Comments

@hcwang
Copy link

hcwang commented Mar 19, 2025

I would like to integrate https://github.com/cnadler86/micropython-camera-API into this project, but I don't know how to do this. Would you please help me? Thanks.

  1. how to add components into ESP-IDF?

Setting up the build environment (DIY method)

To build the project, follow these instructions:

ESP-IDF: I used version 5.2.3, but it might work with other versions (see notes).
Clone the micropython repo and this repo in a folder, e.g. "MyESPCam". MicroPython version 1.24 or higher is required (at least commit 92484d8).
You will have to add the ESP32-Camera driver (I used v2.0.15). To do this, add the following to the respective idf_component.yml file (e.g. in micropython/ports/esp32/main_esp32s3/idf_component.yml):
espressif/esp32-camera:
git: https://github.com/espressif/esp32-camera.git
Alternatively, you can clone the https://github.com/espressif/esp32-camera repository inside the esp-idf/components folder instead of altering the idf_component.yml file.

  1. How to add camera configurations to your board ?

This project supports various boards with camera interface out of the box. You typically only need to add a single line to your board config file ("mpconfigboard.h). Example (don't forget to add the empty line at the bottom):

#define MICROPY_CAMERA_MODEL_WROVER_KIT 1`

  1. How to build the project with USER_C_MODULES?

To build the project, you could do it the following way:

. /esp-idf/export.sh
cd MyESPCam/micropython/ports/esp32
make USER_C_MODULES=../../../../micropython-camera-API/src/micropython.cmake BOARD=<Your-Board> clean
make USER_C_MODULES=../../../../micropython-camera-API/src/micropython.cmake BOARD=<Your-Board> submodules
make USER_C_MODULES=../../../../micropython-camera-API/src/micropython.cmake BOARD=<Your-Board> all

Thanks for your help, and your project make my life easier, thanks.

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

No branches or pull requests

1 participant