Here is a simple guide to get started on Raspberry Pi Camera with just though ssh.
- Access through ssh
- ssh pi@<Pi's IP>
- Install
- $ sudo apt-get install python-picamera
- $ sudo apt-get install python3-picamera
- Enable Camera
- $ sudo raspi-config
- Interfacing options -> Camera -> Enable
- Create the Python script:
- $ touch test.py
- $ nano test.py
- paste one of the following:
- Camera sample code
from picamera import PiCamera
from time import sleep
camera = PiCamera()
camera.start_preview()
sleep(10)
camera.stop_preview()
- Video Sample code
camera.start_preview()
camera.start_recording('/home/pi/video.h264')
sleep(10)
camera.stop_recording()
camera.stop_preview()
- $ python test.py
- Copy the file over to host
- $ scp <video or image file> <host user name>@<hosts's IP>:<host destination folder>
- The video file can be played through VLC.
Comments
Post a Comment