Difference between revisions of "Template:RPI Camera Quick Start"

From Waveshare Wiki
Jump to: navigation, search
Line 7: Line 7:
 
sudo nano /boot/config.txt
 
sudo nano /boot/config.txt
 
</pre>
 
</pre>
{|class="list"
+
{|class="wikitable"
 
! Camera Sensor !! Supported Board !! Configuration
 
! Camera Sensor !! Supported Board !! Configuration
 
|-
 
|-

Revision as of 08:01, 17 June 2022

Camera configuration

If you use the official V1 camera (ov5647), V2 camera (IMX219), and the HQ camera (IMX477), you can just plug in the camera and play.
If you use third-party cameras, the support camera size is as below and please use libcamera stack.
You need to modify the config.txt file and add the configure line according to the camera type.

sudo nano /boot/config.txt
Camera Sensor Supported Board Configuration
OV5647 A full range of Raspberry Pi boards Default setting or
dtoverlay=ov5647
IMX219 Compute Module series only default setting or
dtoverlay=imx219
IMX290 and IMX327 A full range of Raspberry Pi Boards dtoverlay=imx290,clock-frequency=74250000 or
dtoverlay=imx290,clock-frequency=37125000
IMX378 A full range of Raspberry Pi boards dtoverlay=imx378
IMX477 Compute Module series only default setting or
dtoverlay=imx477
OV9281 A full range of Raspberry Pi boards dtoverlay=ov9281

To override the automatic camera detection, Bullseye users will also need to delete the entry or change it to value 0.

camera_auto_detect=1

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 Connect Zero.png
  • Other Raspberry Pi boards
The metal surface of the flexible cable is toward the HDMI interface, then connect to the CSI interface.
RPi Camera Connect Pi4.png

Enable the Camera

If you use the newest Bullseye version Raspberry Pi OS, the camera interface is enabled by default, and you can just skip this part.

  • Open a terminal and enter the configuration page by the following command
sudo raspi-config
  • Enable Camera Interface
Choose Interface Options -> Camera -> Yes -> Finish -> Yes
  • Reboot raspberry Pi

Test Camera(Bullseyes OS)

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

sudo libcamera-hello -t 0

If you need to close the preview windows, you can use Alt-F4 or click the exit icon, or you can go back to the terminal and use ctrl-c to stop the application.

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.