webcam_photo.sh
On this 26-pin model there is no standard CSI port and Picamera2 does not fit the BCM2835: a USB webcam does the job. fswebcam opens /dev/video0, gives auto-exposure 8 frames, then writes a timestamped 720p JPEG. A powered USB hub is advised on this board.
Hardware
A Raspberry Pi Model B revision 1 (BCM2835, 26-pin GPIO header, original through-hole ports, no standard 40-pin P1 connector). A basic UVC USB webcam, powered USB hub if needed.
Wiring
No GPIO wiring: the webcam goes on the USB port. The P1 (26-pin) header stays free.
How it works
V4L2 exposes the webcam as /dev/video0; --frames 8 lets auto-exposure and white balance settle before the shot.
Running it
Copy the script to the board (scp or USB stick), then run it with python3 (or bash). These boards often run an old Raspbian: gpiozero is still apt-installable. GPIO pins follow the 26-pin header in the official schematic.
Variants
Add --flip hv for an upside-down webcam; cron for a photo every minute. Check with v4l2-ctl --list-devices.
webcam_photo.sh
#!/usr/bin/env bash
# webcam_photo.sh — photo depuis une webcam USB sur vieux modele 26 broches.
# Deps: sudo apt install fswebcam
# Pas de port CSI standard sur le connecteur 26 broches: webcam UVC.
# Verifier la presence de la webcam : v4l2-ctl --list-devices (paquet v4l-utils).
# Sortie : photo_AAAAMMJJ_HHMMSS.jpg dans le repertoire courant.
set -eu
if [ ! -e /dev/video0 ]; then
echo "Aucune webcam UVC sur /dev/video0 (brancher puis relancer)"; exit 1
fi
fswebcam -d /dev/video0 -r 1280x720 --no-banner \
--jpeg 90 --frames 8 --delay 1 \
"photo_$(date +%Y%m%d_%H%M%S).jpg"
echo "Photo capturee (fswebcam, webcam USB)"