Use Hat to Switch Cameras and Take Pictures

  1. Where did you get the camera module(s)?
    https://www.amazon.com/Arducam-Autofocus-Quad-Camera-Synchronized-Compatible/dp/B09TSGMCM9

  2. Model number of the product(s)?

Arducam 16MP Autofocus Quad-Camera Kit for Raspberry Pi, 16MP IMX519 Autofocus Synchronized Raspberry Pi Camera, Compatible with Nvidia Jetson Nano/Xavier NX, SKU : B0388

  1. What hardware/platform were you working on?

Raspberry Pi 4 Computer Model B 8GB Single Board Computer

  1. Instructions you have followed. (link/manual/etc.)
    picamera2_examples/HatSwitchCameraTakePicture.py at main · ArduCAM/picamera2_examples · GitHub

  2. Problems you were having?
    The image capture was stuck in the loop while switch to each camera to take pictures individually in max resolution mode

  3. The dmesg log from your hardware?
    Linux raspberrypi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux

PRETTY_NAME=“Debian GNU/Linux 11 (bullseye)”
NAME=“Debian GNU/Linux”
VERSION_ID=“11”
VERSION=“11 (bullseye)”
VERSION_CODENAME=bullseye
ID=debian
HOME_URL=“https://www.debian.org/”
SUPPORT_URL=“Debian – User Support
BUG_REPORT_URL=“https://bugs.debian.org/”

  1. Troubleshooting attempts you’ve made?
    reboot the Raspberry Pi and camera, and then it is back to normal.
    The image capture will stuck sometime after running the script.

  2. What help do you need?
    Could you help to check our image capture function to see if there is anything that needs to be changed to make the script run stable?

Our script was very similar to the example script in picamera2_examples/HatSwitchCameraTakePicture.py at main · ArduCAM/picamera2_examples · GitHub

Thanks for your help!