Getting Started with Raspberry Pi Camera (Beginners)

Don't know how to use the Pi Camera? This is the first step that you can follow!

Introduction

The basic things that you can do with a camera is to take a picture and record a video. Let’s learn how to take a picture and video using a Raspberry Pi Camera.

Video

This tutorial shows how to get start with Raspberry Pi camera.

Hardware Preparation

This is the list of items used in the video.

Sample Program

This is python3 sample program for capturing an image. You can use it with Thonny Python IDE.

from picamera import PiCamera
from time import sleep
camera = PiCamera()
camera.rotation = 180
camera.start_preview()
sleep(5)
camera.capture('/home/pi/Desktop/image.jpg')
camera.stop_preview()

view raw
camera.py
hosted with ❤ by GitHub

This is python3 sample program for recoding a video. You can use it with Thonny Python IDE.

from picamera import PiCamera
from time import sleep
camera = PiCamera()
camera.rotation = 180
camera.start_preview(fullscreen = False, window = (1300,10,640,480))
camera.start_recording('/home/pi/Desktop/video.h264')
sleep(5)
camera.stop_recording()
camera.stop_preview()

view raw
camera.py
hosted with ❤ by GitHub

Thank You

References:

Thanks for reading this tutorial. If you have any technical inquiries, please post at Cytron Technical Forum.

Please be reminded, this tutorial is prepared for you to try and learn.
You are encouraged to improve the code for better application.

Leave a Comment

Your email address will not be published.

Share this Tutorial

Share on facebook
Share on whatsapp
Share on email
Share on print
Share on twitter
Share on pinterest
Share on facebook
Share on whatsapp
Share on email
Share on print
Share on twitter
Share on pinterest

Latest Tutorial

Automatic Dustbin Using REKA:BIT
Ultrasonic HC-SR04P Using Raspberry Pi Pico
Object Sense With Servo Using Maker Pi RP2040
Build Otto DIY Robot Using Maker Pi RP2040
Raspberry Pi RP2040 vs STM32F1 vs SAMD21G18 vs ESP32-S2
Tutorials of Cytron Technologies Scroll to Top