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

From Waveshare Wiki
Jump to: navigation, search
m (Text replacement - "https://www.waveshare.com/w/upload/" to "https://files.waveshare.com/upload/")
Line 21: Line 21:
 
Open the Raspberry Pi terminal, download the driver and install it.<br/>
 
Open the Raspberry Pi terminal, download the driver and install it.<br/>
 
<pre>
 
<pre>
wget https://www.waveshare.com/w/upload/8/8c/IMX519_Driver.zip
+
wget https://files.waveshare.com/upload/8/8c/IMX519_Driver.zip
 
unzip IMX519_Driver.zip
 
unzip IMX519_Driver.zip
 
cd IMX519_Driver/package/
 
cd IMX519_Driver/package/

Revision as of 06:12, 2 September 2023

Driver Installation & Quick Test

Hardware Connection

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

The connectors of the DSI (display) and the CSI (camera) are similar, please note that the CSI interface is between the audio interface and the HDMI interface, and the camera interface of the Raspberry Pi Zero series is next to the Power interface. If you use Compute Module, please check the actual place of the carrier board.

  • Connect to Pi Zero Series
Put the metal surface of the FFC cable downward, and then connect to the CSI interface.
RPi Camera Connect Zero01.jpg
  • Connect to other Raspberry Pi boards
Put the metal surface of the FFC cable toward the HDMI interface, and then connect to the CSI interface.
RPi Camera Connect Pi402.jpg

User the provided image

Camera Test

If it is connected via SSH, you can input "export DISPLAY=:0" for remote control. Note that the Raspberry Pi needs to be connected to an HDMI screen for previewing.
The following commands are used to preview the camera display and set the autofocus parameter, which will make the camera focus automatically when it is on.

libcamera-still --autofocus

If you need to keep focusing, you need to use the terminal to open the camera preview.

libcamera-vid -t 0

Open another terminal and adjust the focus with the focus tool.

cd IMX519_Drive/opencam-V4L2-Driver/focus
sudo python3 FocuserExample.py -d /dev/v4l-subdev1

The command will open another control window, and you can use the up and down arrow keys on the keyboard to adjust the focus position of the camera.