🛠 Camera CSI sur Zero v1.3 : le nappe 22 broches

Raspberry Pi Zero (2015) — Fiche carte · intermediaire · Schéma : IMG-zero-intermediaire-3-camera-csi-revision-v13.svg — connecteur CSI 22 broches mini (pas 0,5 mm) d'une Zero v1.3 avec sa nappe fine Zero, module camera branché, écran mini-HDMI affichant le preview.

Goal

Capture a still image from the Zero's CSI camera port — present only on revision v1.3 boards (revision codes 900093 / 920093). You will identify your revision, fit the correct flex cable, and shoot a 1920x1080 picture.

Wiring & parts

Steps

# Enable the camera interface, then reboot:
sudo raspi-config    # Interface options -> Camera
sudo reboot

python3 - <<'EOF'
from picamera import PiCamera
from time import sleep
cam = PiCamera(resolution="1920x1080", framerate=30)
cam.start_preview   # requires the mini-HDMI display attached
sleep(2)              # let auto-exposure settle
cam.capture("/home/pi/capture.jpg")
cam.close
EOF

On newer OS releases prefer rpicam-still -o capture.jpg (libcamera).

Check

/home/pi/capture.jpg exists as a sharp 1920x1080 JPEG ; with the display attached you see the preview before the shot.

Pitfalls

Autres tutoriels pour cette carte

Exemples de code pour cette carte

← Retour à la fiche 🛠 Tous les tutoriels