Search code examples
toit

Is it possible to use a Camera with an ESP32 running Toit?


I recently purchased two "Aideepen ESP32-CAM W BT Board ESP32-CAM-MB Micro USB to Serial Port CH-340G with OV2640 2MP Camera Module Dual Mode". I tried flashing them with jag flash, but it failed.

The bigger question I have is, is there any way to use a camera with Toit? I tried looking for existing libraries and packages, but I didn't find anything.

If anyone has done this, can you please share with me how it is done?


Solution

  • As of July 2023 Toit does not support any camera module.

    Cameras typically use the "LCD mode" of I2S which isn't yet implemented in Toit. Once that's implemented, one would also need to write a driver to communicate with Toit.

    An alternative route would be to use the existing C libraries and to communicate through services from Toit with the native code. That might be easier to get working, but comes with disadvantages (like being responsible for cleanup and memory).