$ account maxbbraun
The PiSight project transforms a Raspberry Pi Zero with a camera module into a plug-and-play USB webcam by implementing the USB Video Class (UVC) standard via the Linux Gadget API. The hardware setup involves mounting the Raspberry Pi and camera inside an Apple iSight enclosure. Software-wise, the project provides scripts to configure the USB controller in OTG mode, build and install the UVC gadget framework, and activate the gadget as a systemd service. When connected to a host computer, the device appears as a standard webcam requiring no additional drivers. The core functionality resides in `rpi-uvc-gadget.sh`, which uses configfs to define a UVC device with multiple resolutions (640x480, 1280x720, 1920x1080) and formats (uncompressed and MJPEG) at various frame rates. The `setup.sh` automates dependency installation, compilation of the UVC gadget tools from freedesktop.org, and deployment of the service. A systemd unit ensures the gadget persists across reboots. This approach leverages kernel USB gadget infrastructure to create a seamless webcam experience.