Arducam 5642 camera won't start on Raspberry Pi Pico W with CircuitPython

Hi everyone, I’m trying to use an Arducam 5642 camera on a Raspberry Pi Pico W and I just can’t get the camera to start when I run the Python program. I followed the tutorial guide (KB008 manual, https://www.uctronics.com/download/Amazon/KB008_Manual.pdf) and the only way it shows how to start the camera is by running the hostApp executable, plus a Python program that just prints that the camera is ok. The camera never actually starts. Is CircuitPython the right way to do this? I really want to capture images from the camera, but I can’t find the library or the process to turn the camera on or off without using the hostApp executable from the guide. I also watched this video where they do it with an OV2640 (https://www.youtube.com/watch?v=EM304pYqRYQ&t=56s). Any help would be appreciated.

Hi, thanks for the details. Before we dig in, let me confirm your setup. 1) Are you running CircuitPython on the Pico W, and if so which version? 2) When you say the Python program prints the camera is ok, what exactly does it print and where did that script come from? 3) Did you flash a prebuilt firmware/uf2 like hostApp from the manual, or are you compiling the examples yourself? 4) How is the 5642 module wired to the Pico W (which SPI pins)? The behavior you’re describing (script runs, prints OK, but no image) usually means the camera never got initialized, so both the wiring and the firmware/library you’re using matter.

My setup is: Arducam 5642 camera, Raspberry Pi Pico W, and CircuitPython. I checked the process on the website to start the camera and I got as far as running things. When I execute the Python program it prints that the camera is ok, but the camera does not start, there’s no image and I can’t capture anything. I ran the process exactly as the guide describes. The problem is I can’t find the library or the process to actually turn the camera on/off unless I use the hostApp executable mentioned in the guide. I don’t want to rely on that, I want to capture images from my own code.

OK that helps. The important part here: the hostApp in that guide isn’t a library you can call from CircuitPython, it’s a precompiled example/firmware that gets built from a source project. The Python script that just prints ‘camera is ok’ is only reporting the result of the test, it doesn’t contain any code that actually initializes the sensor. So a CircuitPython script alone won’t bring the 5642 up unless it’s driving the camera over SPI and configuring the registers. Quick checks: can you confirm the exact pins you used (SCK/MISO/MOSI/CS) and whether CS is being toggled? Also, does the prebuilt hostApp firmware actually produce an image when you flash it and run it, or does it also fail?

I tried the steps again and re-wired it following the manual. When I follow the hostApp flow it does what the guide says, then the Python test just says the camera is ok, but still nothing from the camera. I’m not sure I can even go without the hostApp, I couldn’t find any library in the guide that turns the camera on. The video I linked shows it working with an OV2640 and I assumed the same process would apply to the 5642. Am I missing some source code somewhere?

Thanks, that matches what I suspected. You’re not missing wiring, you’re missing the source library that actually drives the camera. The hostApp is built from the ArduCam Pico SPI camera project, and that project is where the routines to start/stop the camera live. Check this repo out: GitHub - ArduCAM/PICO_SPI_CAM · GitHub. That’s the library/source you want, it shows how the camera is initialized and how to capture without depending on the prebuilt hostApp executable. Look at the examples in there and see how they set up SPI and pull frames.

Ah, I didn’t know that project existed. I’ll go through the PICO_SPI_CAM repo and try the examples. That explains why the guide’s Python program never started the camera, it was just printing a status. I’ll report back after I try it. Thanks!

No problem. To wrap up where we landed: the reason the camera wouldn’t start is that your setup was missing the driver/source code that actually talks to the sensor over SPI, the guide’s hostApp executable and the small Python status script don’t initialize the camera on their own. The library and process you need are in the ArduCam Pico SPI camera project: GitHub - ArduCAM/PICO_SPI_CAM · GitHub. Start from the examples there for the Pico + SPI camera and you can drive the 5642 from your own code. Post back if you run into anything with SPI init or frame capture and we’ll help. Feel free to contact us if you need more help.