mocleiri / tensorflow-micropython-examples

A custom micropython firmware integrating tensorflow lite for microcontrollers and ulab to implement the tensorflow micro examples.
MIT License
183 stars 87 forks source link

Requesting support for ESP32-S3 with camera module #121

Open tarchive opened 1 year ago

tarchive commented 1 year ago

As pointed out in another issue, there are two variants of the ESP-EYE. https://github.com/mocleiri/tensorflow-micropython-examples/issues/96#issuecomment-1269156018

Currently this repo only covers the ESP32 variant with camera support and so I am requesting support also be added for the ESP32-S3 variant.

esp32s3

Details about my exact board can be found here https://github.com/Freenove/Freenove_ESP32_S3_WROOM_Board

vikramdattu commented 1 year ago

@tarchive did you try with MICROLITE_SPIRAM_CAM board with idf.py set-target esp32s3?

uraich commented 1 year ago

Could you please try this: https://github.com/uraich/EdgeComputing/blob/main/firmware/firmware-esp32s3-cam.bin image Just managed to compile it but did not do any testing apart from importing the modules

Henry1iu commented 1 year ago

Could you please try this: https://github.com/uraich/EdgeComputing/blob/main/firmware/firmware-esp32s3-cam.bin image Just managed to compile it but did not do any testing apart from importing the modules

I have tested it already and found no issues.

whittenator commented 11 months ago

Could you please try this: https://github.com/uraich/EdgeComputing/blob/main/firmware/firmware-esp32s3-cam.bin image Just managed to compile it but did not do any testing apart from importing the modules

How did you build this binary? My FireBeetle 2 ESP32-S3 crashes every time I call camera.init().

uraich commented 11 months ago

Hi Travis, The camera driver expects this connection map: image (see micropython-modules/micropython-camera-driver/src/modcamera.h) If your board has different connections (which I suspect), then you must specify these when initializing the camera. I have a Freenove ESP32S3 board with camera for which the initialization looks like this: image Hope this helps

whittenator commented 11 months ago

Hi Travis,

The camera driver expects this connection map:

image

(see micropython-modules/micropython-camera-driver/src/modcamera.h)

If your board has different connections (which I suspect), then you must specify these when initializing the camera.

I have a Freenove ESP32S3 board with camera for which the initialization looks like this:

image

Hope this helps

Thanks for the speedy reply!

I am using the DFRobot FireBeetle 2 ESP32-S3 that comes with the OV2640. I am doing the camera.init(0) that is recommended for my camera. Any ideas on how I can see why it restarts the board whenever I do this camera.init(0) call?

uraich commented 11 months ago

I had a quick look at the connections for the FireBeetle 2 (https://wiki.dfrobot.com/SKU_DFR0975_FireBeetle_2_Board_ESP32_S3) and the connections are not the ones of the first screen dump I showed you. For example: SCL -> GPIO 2 on your board and not GPIO 27 as expected by the driver default SDA -> GPIO 1 on your board, expected GPIO 27. You will therefore have to initialize your camera as shown in the second screen dump, replacing the GPIO numbers with the one used by your board. It is understandable that your system crashes when you try to initialize your camera. You send signals onto wrong pins. In addition you will have to enable the camera power on the axp313A. I have no such board and I can therefore not test anything.