How to Enable Dual Cameras on Raspberry Pi CM4 and CM4IO

How to Enable Dual Cameras on Raspberry Pi CM4 and CM4IO

The Raspberry Pi CM4IO board provides dual MIPI CSI-2 camera interfaces, but the system is not enabled by default. This article will introduce how to configure and use dual cameras.

Hardware Preparation

CM4 & CM4IO development board X 1, Raspberry Pi camera module X 2, camera module flat cable X 2

How to Enable Dual Cameras on Raspberry Pi CM4 and CM4IOHere we use the official 8-megapixel camera module, the default flat cable is not compatible with CM4IO, so you need to prepare a compatible flat cable as shown in the picture.

How to Enable Dual Cameras on Raspberry Pi CM4 and CM4IO

Use the flat cable to connect the camera modules to the CAM0 and CAM1 interfaces on the CM4IO board, ensuring that the silver side of the cable faces down.

If only one camera is used, no special hardware setup is required. If you want to enable multiple cameras, you need to use a jumper cap to short the J6 on the CM4IO board, as shown in the picture below.

How to Enable Dual Cameras on Raspberry Pi CM4 and CM4IO

System Settings

Run the following command to update the dt-blob.bin file.

sudo wget https://datasheets.raspberrypi.org/cmio/dt-blob-dualcam.bin -O /boot/dt-blob.bin

How to Enable Dual Cameras on Raspberry Pi CM4 and CM4IORun the command to enable the camera interface.

sudo raspi-config

Select Interface Options -> Camera -> Enable, and after setting, restart the system as prompted (for systems with a graphical interface, you can enable the Camera directly in the settings).

Usage Method

After restarting, enter the terminal and type the command.

ls /dev

Check if the devices video0 and video1 appear.

How to Enable Dual Cameras on Raspberry Pi CM4 and CM4IO

Then you can start using it. To specify a particular camera, you can use the -cs parameter.

# Open the first camera to take photos and record videos
sudo raspistill -o test.jpg -cs 0
sudo raspivid -o test.flv -cs 0
# Open the second camera to take photos and record videos
sudo raspistill -o test.jpg -cs 1
sudo raspivid -o test.flv -cs 1

If you have any questions, feel free to discuss in the group~https://talk.quwj.com/

Leave a Comment

×