Template: RPI Camera Quick Start

From Waveshare Wiki
Jump to: navigation, search

Hardware Connection

To test the Camera, you need to connect a HDMI display or a DIS display for previewing.

The connectors of the DSI interface (display) and the CSI interface (camera) look the same, please take care of it when you connect the camera. The CSI interface is placed between the Audio jack and the HDMI port. the CSI connector of Pi zero is beside the Power interface. If you use Compute Module, please check the actual place of the carrier board.

  • Connect ot Pi Zero Series
The metal surface of the flexible cable is downward, then connect to the CSI interface.
RPI Camera Zero2.jpg
  • Other Raspberry Pi boards
The metal surface of the flexible cable is toward the HDMI interface, then connect to the CSI interface.
RPi Camera Pi42.jpg


Test Camera(Bullseyes OS)

Configure
If you use OV9281, IMX290, IMX378, or non-Raspberry Pi official IMX219 and IMX477 cameras, you need to configure the config.txt file separately.

sudo nano /boot/config.txt

Find "camera-auto-detect=1" and modify it to "camera_auto_detect=0"

At the end of the file, add the following setting statements according to the camera model.

model set statement
OV9281 dtoverlay=ov9281
IMX290/IMX327 dtoverlay=imx290,clock-frequency=37125000
IMX378 dtoverlay=imx378
IMX219 dtoverlay=imx219
IMX477 dtoverlay=imx477
Open the Raspberry Pi terminal and enable the camera preview
sudo libcamera-hello -t 0

If you want to close the preview window, you can directly combine the keys Alt-F4, or click x to close. You can also go back to the terminal interface and terminate the program with Ctrl+c.

Test Camera(Buster OS)

Open a terminal and test the camera with the following command:

sudo raspistill -t 0

If you want to close the preview windows, you can use Ctrl-C to stop the appliation.