Skip to content
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

camera driver shouldnt require making changes in micropython #32

Closed
aguaviva opened this issue Nov 27, 2021 · 3 comments
Closed

camera driver shouldnt require making changes in micropython #32

aguaviva opened this issue Nov 27, 2021 · 3 comments

Comments

@aguaviva
Copy link

Hi Mauro,

I know you put this project a long time ago and you did a great job.

There is a very interesting way to structure the driver so people don't need to make any manual changes to micropython, it will just pick the new module where ever it is.

A good example of that is this TDT driver: https://github.com/russhughes/ili9342c_mpy

It takes no time to setup and compile, I hope you like it! :)

Cheers and thanks for this fantastic driver!!

@lemariva
Copy link
Owner

lemariva commented Jan 8, 2022

Done! Thanks for the link. 👍

  • I couldn't integrate one modification: for the PSRAM related I couldn't find a solution.
  • I couldn't switch off the CMake flag for the DBTree library and I got some problems with it (thus, I modified some other files).

If you have any idea, how to solve those issues I can include it in the repository. Thanks!

@mocleiri
Copy link

mocleiri commented Feb 2, 2022

@lemariva micropython/micropython#8219 just got merged which removes the need to modify micropython for PSRAM changes.

As long as the sdk config sets CONFIG_SPIRAM_USE_MALLOC=y then micropython will now only claim 1/2 of the available PSRAM. So with ESP32-CAM-MB its 4MB of PSRAM is split 2MB for the micropython heap and 2MB for esp32-camera or other idf components.

I included a modified version of your library(I expect to try and upstream the differences) in https://github.com/mocleiri/tensorflow-micropython-examples/ we are building https://github.com/mocleiri/tensorflow-micropython-examples/tree/main/boards/esp32/MICROLITE_SPIRAM_CAM without any DBTree changes.

Thank you for making this library as it enabled us to get the tensorflow lite for microcontrollers person detection example working.

@lemariva
Copy link
Owner

lemariva commented Feb 2, 2022

@mocleiri thanks for posting this information. I've just updated the driver and works really nice.
Now it's possible to take HD photos with the camera. I added an argument fb_location to enable the use to select between PSRAM or DRAM. Summarizing:

  • The DBTree modifications were a problem with my disk format. I cloned the repository inside my encrypted drive (extended FAT) and then moved it to a Ext4 because of the symbolic links (those doesn't work under FAT). But something was still there.
  • The main.c file doesn't need any modification.

I'll check out your library, looks very promising!

@lemariva lemariva closed this as completed Feb 2, 2022
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

3 participants