Updating old home wiring
I wrote this in Python using the Py GSM library, which makes things very easy (generally no need to mess around with AT commands).
So I wrote a small script that switches modes according to the position of a switch connected to a GPIO pin.This requires the 5V and GND lines on the GPIO pins, plus the composite video output pin, to be wired to their counterparts in the monitor.Once I’d used the correct video pin this worked without issue!On startup, or when the switch position changes, the script runs the appropriate shell command for that mode.For regular dashcam recording, that’s a simple raspivid command; for streaming it pipes the raspivid output through ffmpeg (see command above).
Search for updating old home wiring:
The Pi Zero has 3 wires connected – 5V, 0V and video, which on my monitor go to a convenient electrolytic capacitor and the back of a PCB socket.