lemariva / uPyCam

Take a photo with an ESP32-CAM running MicroPython
https://lemariva.com/blog/2019/09/micropython-how-about-taking-photo-esp32
Apache License 2.0
138 stars 40 forks source link

Using with other uPython devices #21

Open AwesomeCronk opened 2 years ago

AwesomeCronk commented 2 years ago

I'd like to use this camera module with other uPython devices, like the Pi Pico. Do you have the Python code available as a module instead of a firmware port? What would I need to do to get it from the source here?

sgbaird commented 1 year ago

Any update on this? @AwesomeCronk, if not, did you find any suitable alternatives? I'm interested in a Pico W friendly color camera module with a grove port for the connection (for use with low framerate video feed).

AwesomeCronk commented 1 year ago

@sgbaird I found this: https://github.com/namato/micropython-ov2640 and it definitely holds promise, but the OV2640 has fairly complicated and extending that project to support streaming and camera settings would be equally complicated. That said, I do want to try either scratch writing a driver based on it or extending what's there. I do need to get an OV2640 that's not stuck to an ESP32 before I try though.

sgbaird commented 1 year ago

@AwesomeCronk agreed that one seems interesting/relevant. After looking around, I ordered ArduCam's 2 MP OV2640 module and some jumper wires (no grove port, unfortunately). The delivery is scheduled for today, so hopefully, I can try https://github.com/namato/micropython-ov2640 with one of my Pico W's just to verify it works. PiShop just got some more Pico W's in stock, and they're available at DigiKey, too.

sgbaird commented 1 year ago

@AwesomeCronk I have a Pico W, and I gave https://github.com/namato/micropython-ov2640 a try. I also tried ArduCam's CircuitPython library. There's an ESP32 version that someone wrote as well. I haven't been able to get any of these to work:

Since RP2040 and ESP32 accomplish the same task with different hardware, software meant for ESP32 may not be directly compatible with RP2040 boards.

I came across the Pimoroni Enviro Camera (Pico W Aboard), which isn't in stock yet. Once this goes into stock, I'd like to purchase it and power it via a micro-USB splitter or similar. I think this will probably be one of the more straightforward/prepackaged solutions, and it can then just send the images directly to another Pico W that's running my other programs. Might seem a bit wasteful to have a second Pico W just as a camera, but at this point and for the price that's listed, it seems worth it to me..

Another possibility: https://learn.adafruit.com/capturing-camera-images-with-circuitpython/raspberry-pi-pico-wiring#for-the-ov2640-camera-3098354 which uses https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/hw-reference/esp32s2/user-guide-esp-lyrap-cam-v1.0.html