30cm (11.8 inches)
30cm (11.8 inches)
CSI-2 (Camera Serial Interface 2)
Raspberry Pi Zero and Raspberry Pi Zero W
-20C to 80C (-4F to 176F)
-40C to 125C (-40F to 257F)
10g (0.35 oz)
Applications
| The Raspberry Pi Zero Camera Cable is ideal for a range of applications, including |
Robotics and computer vision projects
Surveillance and security systems
Media centers and home automation projects
Educational projects and prototyping
Proof-of-concept development and testing
Conclusion
The Raspberry Pi Zero Camera Cable - 30cms is a high-quality cable designed specifically for use with the Raspberry Pi Zero and Raspberry Pi Zero W. Its secure and reliable connection, high-speed CSI-2 interface, and compatibility with official Raspberry Pi camera modules make it an ideal choice for a wide range of applications.
Raspberry Pi Zero Camera Cable - 30cms DocumentationOverviewThe Raspberry Pi Zero Camera Cable - 30cms is a high-quality, flexible cable designed specifically for the Raspberry Pi Zero and Raspberry Pi Zero W. This cable allows you to connect the Raspberry Pi camera module to your board, enabling you to capture high-quality images and videos.Technical SpecificationsLength: 30cm
Compatible with Raspberry Pi Zero and Raspberry Pi Zero W
Compatible with Raspberry Pi camera modulePinoutThe camera cable has a 15-pin connector on one end and a 15-pin socket on the other. The pinout is as follows:| Pin | Function |
| --- | --- |
| 1 | VCC (Power) |
| 2 | SCL (Clock) |
| 3 | SDA (Data) |
| 4 | PWDN (Power Down) |
| 5 | RESET (Reset) |
| 6 | XCLK (Clock) |
| 7 | PCLK (Pixel Clock) |
| 8 | VSYNC (Vertical Sync) |
| 9 | HSYNC (Horizontal Sync) |
| 10 | DIN (Data In) |
| 11 | DOUT (Data Out) |
| 12 | DNK (Data Not Known) |
| 13 | GND (Ground) |
| 14 | GND (Ground) |
| 15 | GND (Ground) |Code Examples### Example 1: Capture an Image using PythonThis example demonstrates how to use the Raspberry Pi camera module with the camera cable to capture an image using Python.```python
import picamera# Create a camera object
camera = picamera.PiCamera()# Set the camera resolution
camera.resolution = (640, 480)# Capture an image
camera.capture('image.jpg')# Release the camera
camera.close()
```### Example 2: Stream Video using Python and OpenCVThis example demonstrates how to use the Raspberry Pi camera module with the camera cable to stream video using Python and OpenCV.```python
import cv2
from picamera import PiCamera
from picamera.array import PiRGBArray# Create a camera object
camera = PiCamera()
camera.resolution = (640, 480)
camera.framerate = 30# Create a raw capture object
rawCapture = PiRGBArray(camera, size=(640, 480))# Create an OpenCV window
cv2.namedWindow("Video", cv2.WINDOW_NORMAL)# Capture and display video frames
for frame in camera.capture_continuous(rawCapture, format="bgr", use_video_port=True):
image = frame.array# Display the frame
cv2.imshow("Video", image)# Exit on key press
if cv2.waitKey(1) & 0xFF == ord('q'):
break# Release resources
rawCapture.truncate(0)
cv2.destroyAllWindows()
```Note: These examples assume that the camera module is properly connected to the Raspberry Pi Zero using the camera cable.