Arducam success! Finally

blog

If you have been following along here for a while you’ll know that I have had constant failures trying to get an Arducam Mega 3MP working with my IoT projects. The last attempt was:

https://blog.ciaopslabs.com/2025/07/13/arducam-mega-3mp-failed-attempt/

After getting my robot car working with a PS3 controller I was working towards getting the PS3 controller also working with my robot arm. At the moment the robot arm is connected to a Keyestudio KS0172 with a Keyestudio Sensor Shield/Expansion Board V5 for Arduino Leonardo attached. Unfortunately, the Keyestudio KS0172 lacks both Bluetooth and Wifi but I noticed the Keyestudio Sensor Shield/Expansion Board V5 for Arduino Leonardo actually has a dedicated SPI port like so:

image

Ah ha. I wonder if I can get that working with the Arducam? Spoiler alert, yes I can.

I have now come to realise probably the two biggest mistakes I have made with the Arducam Mega 3MP:

1. I thought it was a ‘streaming’ style camera. No it’s designed really just to take pictures

2. I need something to ‘read/download’ the images from the camera to actually see those images

With the camera connected to the Keyestudio Sensor Shield/Expansion Board V5 for Arduino Leonardo SPI port. As a reminder the camera connections are:

image

I used this piece of code on the Keyestudio KS0172:

https://github.com/directorcia/Azure/blob/master/Iot/Arducam/3MP/capture-image.cpp

to connect to the camera and allow a photo to be taken and stream it down the serial port on request. The documentation for this code is here:

https://github.com/directorcia/Azure/blob/master/Iot/Arducam/3MP/capture-image.md

I then had to write some Python code to actually initiate a photo being taken and extract the image from the camera over the USB/serial port and put it into a subdirectory on my machine. That code is here:

https://github.com/directorcia/Azure/blob/master/Iot/Arducam/3MP/capture-image.py

and the documentation for that is here:

https://github.com/directorcia/Azure/blob/master/Iot/Arducam/3MP/capture-image-py.md

and to execute this Python script I also needed to install Python on my machine, which is pretty easy in Visual Studio code by just adding the Python extension.

With all that in place and after a bit of back and forth to get the image to download correctly via the serial port I was indeed able to confirm that my Arducam Mega 3MP  is working properly and I can now use it to take photos.

Phew. That took a long time and a lot of effort. I think my major oversights, listed above, really held me back here along with the usual physical connection challenges. Now, I have a much better understanding of what the camera can and can’t do and what I need to actually see an image and most importantly the Arducam Mega 3MP is finally actually working!

ACEBOTT Smart car – Bringing it all together

blog

It is now time to bring all the pieces together on the Acebott Smart Car and make it a movable platform that can stream live video.

Screenshot 2026-01-04 101028

Screenshot 2026-01-04 101245

I’ve taken the standard ACEBOTT ESP32 Smart Car Starter Kit with Mecanum Wheels and added the ACEBOTT Bluetooth Controller Expansion for QD001 (QD010) to control its movement. I have also added the ACEBOTT ESP32 Camera Expansion pack for Smart Car (QD002) to give the car vision.

You can see that I have kept the ultrasonic sensor from QD001 and simply mounted the camera (QD002) on top to facilitate pan left and right. I could have added an additional servo to control this independently of the ultrasonic sensor, however in the end I decided that it was easier simply to print a 3D mount so the camera unit could sit above the ultrasonic senor and take advantage of the pan left and right servo already in place. I could refine the design with a separate 3D printed mount for the camera unit if desired, but for the sake of getting things working I’ve decide to stay with thsi method.

I have detailed how to get the PS3 controller (QD010) working with the robot car (QD001) here –

https://blog.ciaopslabs.com/2025/12/28/connecting-a-joystick-controller-to-an-acebott-esp32-smart-car/

and I have covered off getting the camera (QD002) working stand alone here:

https://blog.ciaopslabs.com/2025/12/31/connecting-a-webcam-to-an-acebott-esp32-smart-car/

You’ll find the code and documentation in those articles. At a minimum you’ll need to program the camera (QD002) to support the creation of a web server so it can stream the video to a device.

To mount a device with a screen (an old iPhone) to the PS3 controller (QD010) I found this:

Universal smartphone mount for DUALSHOCK 3 (PS3 controller)

that I could 3D print. I did need to slight extend the width of the base to suit my controller but it worked a treat.

Screenshot 2026-01-04 103123

The above version of the holder was my first printing attempt where I broke the lower part of the base holder when attempting to fit on the controller. This lead to me slightly lengthening the model the second time around that fixed the issue. The initial broken model is secured here using some rubber bands but the re done version fits perfectly.

With the code loaded into the robot car (QD001) and the camera (QD002) as well as having the PS3 controller (QD010) connected the end result looks like: