Kurse › Raspberry Pi › Stufe 9
Raspberry Pi · Einsteiger · Stufe 9 / 40
Camera Basics
Connect a camera module and capture stills, video and time-lapses from the command line and from Python.
Einsteiger freischalten · CHF 9.90 Stufen 1–13, einmalig, kein Abo
10 Lektionen in dieser Stufe
- Camera Modules, Ribbon Cables and the Two Connector Sizes
Choose a camera and fit the correct cable the right way round. · Lab: Connect a camera to your board with power off and check the latch and contact orientation. - Checking the Camera with rpicam-hello
Confirm the camera is detected and read what the system reports about it. · Lab: Run rpicam-hello --list-cameras and a five-second preview, and note the sensor modes. - Taking Still Photos with rpicam-still
Capture JPEG and PNG stills with chosen size, quality and delay. · Lab: Take the same scene at three resolutions and compare file size and detail. - Recording Video with rpicam-vid
Record clips of a set length and wrap them into MP4 with ffmpeg. · Lab: Record a ten-second clip, convert it to MP4 and play it on another computer. - First picamera2 Script: Preview and Capture
Start the camera from Python and save an image. · Lab: Write a picamera2 script in a venv that shows a preview for three seconds and captures a JPEG. - Resolution, Sensor Modes and File Size
Relate sensor mode, field of view and storage use. · Lab: Capture in each sensor mode and fill in a table of field of view, frame rate and bytes. - Focus, Exposure and White Balance for Beginners
Fix the three most common causes of a bad picture. · Lab: Photograph a label at 10 cm and at 2 m with autofocus, then lock exposure for a backlit scene. - Shooting a Time-Lapse and Assembling It with ffmpeg
Capture frames at an interval and build a video from them. · Lab: Shoot one frame every ten seconds for an hour and render a 30 fps clip. - Triggering Photos with a Button and a PIR Sensor
Combine gpiozero events with picamera2 capture. · Lab: Take a photo on each button press, then on each motion event with a cool-down period. - Organising, Naming and Transferring Captures
Keep captures sorted by date and stop the card filling up. · Lab: Save into dated folders, delete the oldest when free space runs low and rsync the rest to a laptop.
Abschlussprojekt
A doorway camera that takes a timestamped photo on motion or button press, plus a one-hour time-lapse assembled into a video.
Teile für diese Stufe
- 1 × Raspberry Pi 5 or Pi 4 set from Level 1
- 1 × Camera module with autofocus (Camera Module 3 type)
- 1 × Camera ribbon cable 22-pin to 15-pin for Pi 5
- 1 × Camera mount or small tripod
- 1 × PIR motion sensor module from Level 7
- 1 × Tactile push button from Level 7
In jeder Lektion legst du die passenden Teile direkt in den Warenkorb. Raspberry Pi →
Voraussetzung: Level 8: GPIO inputs, timing and file handling in Python.