0% found this document useful (0 votes)
21 views31 pages

Chapter 2 Intro To Raspberry Pi

The document provides an introduction to the Raspberry Pi, a versatile single-board computer designed for various applications. It outlines methods for downloading and installing Raspbian (now Raspberry Pi OS), including manual installation and using NOOBS, as well as steps for configuring the Raspberry Pi for use with OpenCV. Additionally, it details the setup process, including connecting peripherals and using the raspi-config tool for system configuration.

Uploaded by

agigigwapo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views31 pages

Chapter 2 Intro To Raspberry Pi

The document provides an introduction to the Raspberry Pi, a versatile single-board computer designed for various applications. It outlines methods for downloading and installing Raspbian (now Raspberry Pi OS), including manual installation and using NOOBS, as well as steps for configuring the Raspberry Pi for use with OpenCV. Additionally, it details the setup process, including connecting peripherals and using the raspi-config tool for system configuration.

Uploaded by

agigigwapo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 31

INTRODUCTION TO RASPBERRY

PI

Presented
by: Group 2
INRODUCTION TO RASPBERRY PI

The Raspberry Pi is a small, inexpensive single-board


computer developed by the Raspberry Pi Foundation
in the UK. It's designed to be a versatile computing
platform for various applications, from learning
programming and robotics to home automation and
edge computing.
DOWNLOADING AND INSTALLING
RASPBIAN
• Method 1: Manual Installation
This method involves downloading the Raspbian image, then using third-party
software to write the image to an SD card. This is advantageous if you have a
smaller SD card (8GB minimum) as it uses less space.

• Method 2: NOOBS Installation


This method uses NOOBS (New Out Of the Box Software). NOOBS simplifies the
installation process and doesn't require installing additional software. It's
described as the easier option.
RASPBIAN WITH OPEN CV

• Raspbian Overview
• Raspbian is the official OS for Raspberry Pi, now called Raspberry Pi OS.
• It's a Debian-based Linux OS, optimized for Raspberry Pi hardware.
• Comes in Lite, Desktop, and Full versions.
• OpenCV Overview
• OpenCV (Open Source Computer Vision Library) is a powerful library for real-
time computer vision and image processing.
• Written in C++, with bindings for Python, Java, etc.
• Used for face detection, object tracking, image filtering, and more.
RASPBIAN WITH OPEN CV
Installation on Raspbian
• There are two main ways to install OpenCV:

A. Using apt (simpler but older version):


• sudo apt update
• sudo apt install python3-opencv
• Fast and easy, but may not have the latest features.

B. Building from source (recommended for latest version):


• Steps include:
• Install dependencies (cmake, python-dev, numpy, etc.)
• Download OpenCV and OpenCV_contrib from GitHub
• Use cmake to configure the build
• Compile using make (may take several hours)
RASPBIAN WITH OPEN CV

• Typical Applications
• Face/object detection using Haar cascades or DNNs
• Video capture via Pi Camera or USB webcams
• Image processing (filters, edge detection, etc.)
• Motion detection and surveillance
• Camera Integration
• Use the PiCamera module or OpenCV's cv2.VideoCapture(0) for
USB/webcam.
• For the Pi Camera, libcamera is now preferred over legacy raspi still.
THE “HARD” WAY

- YOU HAVE 2 OPTIONS FOR YOUR RAPSBIAN INSTALLATION


- Jessie is the most recent stable versions of the operating system.
THE “HARD” WAY

THE 1ST OPTION IS RASPBIAN JESSIE WITH PIXEL COMES WITH A


OPTIMIZED GUI.
- IT IS A 1.5GB DOWNLOAD, AND IT IS A 4.2GB IMAGE ONCE IT’S
BEEN DECOMPRESSED.
THE “HARD” WAY

THE 2ND OPTION IS RASPBIAN JESSIE LITE, A MINIMAL IMAGE THAT


IS A MUCH SMALLER 300MB DOWNLOAD (1.4GB AFTER
DECOMPRESSION).

- HOWEVER, MINIMAL MEANS NO GUI, SO EVERYTHING IS DONE


VIA THE COMMAND LINE.
STEPS IN INSTALLING RAPSBERRY PI:

• If you have a BitTorrent client installed, click Download Torrent. This is much
faster than downloading the zip file.
1. Navigate to www.raspberrypi.org/downloads/.
2. Click the Raspbian image.
3. Select the Raspbian flavor that you want to install.
4. Once the download is complete, decompress the file somewhere that you'll
easily find it.
5. Download and install Win32. Disk Imager. This allows you to write the image
file that you just downloaded to the micro SD card. You can get it at
https://sourceforge.net/projects/win32diskimager/.
STEPS IN INSTALLING RAPSBERRY PI:

6. Optionally, you may also want to download SDFormatter to make sure that
your SD card is properly prepared. You can get it at
www.sdcard.org/downloads/formatter 4/.
7. Insert your micro SD card into the card reader connected to your computer.
8. If you have downloaded and installed SDFormatter, open it. You should see a
dialog box similar to the one shown in Figure 2-2.
STEPS IN INSTALLING RAPSBERRY PI:

9. Make sure that you select the drive representing your SD card. You're about
to format it, so if you select the wrong thing, it will wipe out whatever you
have on that drive. The tool usually selects the right one by default, but
double check. It would be wise to disconnect any other external storage
devices.
10. Make sure that Format size adjustment is set to On. This removes any other
partitions on the card and uses the whole thing. Leave all the other settings at
the default.
11. Click Start. When the process finishes, you're ready to install the OS.
STEPS IN INSTALLING RAPSBERRY PI:

12. To flash the image in the SD card, upen Win32 Disk Imager.
13. In the image file field, select the Raspbian image that you downloaded. You
can click the file folder icon to navigate to it.
14. Make sure that your SD card is selected in the device drop-down box. Again,
selecting the wrong device can lead to a world of hurt; so pay attention.
15. Click Write.
16. Once the process has completed, remove the card from your card reader.
17. Insert the card into the micro SD card reader on the Raspberry Pi.
• That sounds lengthy, but it is remarkably fast and easy to do. Next, let's walk
through the NOOBS installation process.
THE “EASY”
WAY

What is NOOBS?

• NOOBS (New Out Box Software) is a simple OS


installer for Raspberry Pi. It’s beginner-friendly and
ideal for people who are setting up their Pi for the
first time.
THE “EASY” WAY

Two Versions of NOOBS

• NOOBS: Includes Raspbian (now Raspberry Pi OS)


with download.
• NOOBS Lite: Requires internet to download the OS.
THE “EASY” WAY
Here are the Steps

1. Click the NOOBS image on the download page.


2. Select your NOOBS flavor. If you have BitTorrent client
installed, click Download Torrent. This is much faster than
downloading the .zip file.

3. Optionally you may also want to download SDFormatter to


make sure that your SD card is properly prepared. You can
get it at www.sdcard.org/downloads/formatter4/

4. If you download and installed SDFormatter, open it.


THE “EASY” WAY

5. Make sure that your select the drive representing your SD card.
6. Make sure that Format size adjustments is set to On.
7. Click Start. When the process has finished, you’re ready to install the
OS.

8. Unzip the NOOBS file directly onto the SD card.


9. Remove the card from your card reader.
10.Insert the card into the micro SD card reader on the Raspberry Pi.
THE “EASY” WAY

11. At this point, you need to hookup your Pi to continue.

12. When you connect power to the Raspberry Pi, it boots up to the
NOOBS installation screen. If you used the standard NOOBS download,
your only option is Raspbian ( which is OK because that’s what we’re
using).

13. Click Raspbian to make sure that it’s selected. Choose the right
language.

14. Click Install.


CONNECTING RASPBERRY PI:

• Connecting Raspberry Pi Now that your micro SD card is ready to go, you need to
hook up your Raspberry Pi. If you're using an original, first generation Pi, this is a
little more complicated.

• Every model after the original, however, includes multiple USB ports and an
HDMI connector to make things easier. Hooking up the Pi is very simple.
CONNECTING RASPBERRY PI:
1. Connect your monitor via the HDMI cable. If you are using a small television that is
outfitted with component hookups rather than HDMI, the audio jack on the Pi is a
four-pole component jack. You need an RCA-to-3.5mm converter, usually in cable
form, to do this.

2. Connect your keyboard and mouse to the USB ports. I use a wireless
keyboard/touchpad combination because it's compact and portable.

3. Make sure that your micro SD card with Raspbian or NOOBS is installed in the micro
SD port on the Pi. Essentially, this is the hard drive for your small computer, so it has
to be in the right place, it will not read the OS through an SD card reader connected
to one of the USB ports.
CONNECTING RASPBERRY PI:

4. If you are using an Ethernet cable, connect it to the Ethernet port. You may
also plug a Wi-Fi dongle to the USB port. If you are using a Pi 3, as I am ,Wi-
Fi is built in.

5. Connect the 5V power to the micro USB port. This port is only for power.
You cannot access the board via USB.
CONFIGURING YOUR PI

• To configure your Raspberry Pi, especially for use with OpenCV and computer
vision tasks, follow these step-by-step instructions:
• Install Raspberry Pi OS

Option A: Raspberry Pi Imager


• Download from: https://www.raspberrypi.com/software
• Choose Raspberry Pi OS (32-bit) for stability or 64-bit for newer Pis (Pi 4, 5).
• Flash it to a microSD card (at least 16 GB recommended).

Option B: Manual Flashing


• Use Balena Etcher or similar tools to flash .img files.
CONFIGURING YOUR PI

• First Boot Setup


• Insert the SD card, power on the Pi.
• Go through initial setup:
• Set country, language, and time zone.
• Connect to Wi-Fi.
• Change default password.
• Update software when prompted.
• Basic Configuration (raspi-config)
CONFIGURING YOUR PI
• Open the terminal and run:
• sudo raspi-config
• Key settings to check:
1 System Options:
• Hostname (e.g., raspberrypi)
• Boot / Auto-login (desktop or CLI)
2 Display Options:
• Screen resolution if using remote desktop.
3 Interface Options:
• Enable Camera
• Enable SSH (for remote access)
• Enable VNC (GUI remote access)
• Enable SPI/I2C if using sensors
CONFIGURING YOUR PI

4 Performance:

• Set GPU memory to 128MB or higher for OpenCV video tasks


• Finish and reboot.
• Update & Upgrade System

Always keep the system updated:


• sudo apt update
• sudo apt full-upgrade -y
• sudo reboot
• Install Essential Packages
CONFIGURING YOUR PI

For OpenCV development:


• sudo apt install build-essential cmake git python3-dev python3-pip python3-numpy
libjpeg-dev libtiff5-dev libjasper-dev libpng-dev libavcodec-dev libavformat-dev
libswscale-dev libv4l-dev libgtk2.0-dev libatlas-base-dev gfortran –y

• Enable the Camera

If using the Pi Camera Module:


• Run sudo raspi-config
• Go to Interface Options > Camera > Enable
• Reboot: sudo reboot
• Test the Camera
CONFIGURING YOUR PI

Use:

• libcamera-still -o test.jpg
Or for OpenCV with USB cam:
• import cv2
• cap = cv2.VideoCapture(0)
• ret, frame = cap.read()
• cv2.imshow('Test', frame)
• cv2.waitKey(0)
• cap.release()
• cv2.destroyAllWindows()
USING RASPI-CONFIG

• Raspi-config:
• Raspi-config is a configuration tool for Raspberry Pi that lets you
easily set up and manage basic system settings through a simple
text-based menu.
USING RASPI-CONFIG

How to Use It:


• Open a terminal on your Raspberry Pi.
• Run this command:
• Sudo raspi-config
• The Sudo part gives you admin privileges.
• You'll see a menu with various setup options. You can navigate using the
arrow keys and press Enter to select.
• Common Options in the Menu:
• System Options: Change the hostname, enable/disable boot to desktop, etc.
USING RASPI-CONFIG

• Display Options: Set resolution and screen settings.


• Interface Options: Enable interfaces like SSH, SPI, I2C, or the camera module.
• Performance Options: Adjust settings like overclocking.
• Localization Options: Set your language, keyboard layout, time zone, and Wi-Fi
country.
• Advanced Options: Resize the file system, enable USB boot, etc.
• After making your changes, select Finish. You may be prompted to reboot for
changes to take effect.
• It's basically a quick way to configure key settings on a Raspberry Pi without
needing to edit system files manually.
END..

GROUP 2
CANCIO, MARIA BLESIE
LINIJAN, RAPHAEL
MALLOSA, ELAIZA MAE
MIRAFLOR, SYDNEY
OCAY, KHAI ZYANN
TORRES, BRICE

You might also like