0% found this document useful (0 votes)
4 views

oit

The document provides a comprehensive guide on using the Raspberry Pi 3 Model B, including hardware requirements, installation of the Raspberry Pi OS, and practical applications such as LED blinking, interfacing with a Pi camera, and using a 7-segment display. It outlines step-by-step procedures for formatting the SD card, writing code in Python, and connecting various components. Each practical section includes necessary hardware, software installation instructions, and example Python scripts for executing tasks.

Uploaded by

fastflickfusion
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

oit

The document provides a comprehensive guide on using the Raspberry Pi 3 Model B, including hardware requirements, installation of the Raspberry Pi OS, and practical applications such as LED blinking, interfacing with a Pi camera, and using a 7-segment display. It outlines step-by-step procedures for formatting the SD card, writing code in Python, and connecting various components. Each practical section includes necessary hardware, software installation instructions, and example Python scripts for executing tasks.

Uploaded by

fastflickfusion
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

PR 1 >>AIM:- INTRODUCTION TO RASPBERRY PI 3 MODEL

B.
Hardware Guide
1. Raspberry Pi (latest Model) 2. Monitor or TV 3. HDMI
cable 4.
Ethernet cable 5. USB keyboard 6. USB mouse 7. Micro
USB power
supply 8. 8GB or larger microSD card 9. SD Card Reader
Raspberry Pi 3 Model B:
The Raspberry Pi 3 is the third generation Raspberry Pi. It
replaced the Raspberry Pi 2 Model B in February 2016.
Compared to the Raspberry Pi 2 it has:
 A 1.2GHz 64-bit quad-core
 ARMv8 CPU
 802.11n Wireless LAN
 Bluetooth 4.1
 Bluetooth Low Energy (BLE)
USB ports :— these are used to connect a mouse and
keyboard. You can also connect other components,
such as a USB drive.

SD card slot :— you can slot the SD card in here. This is
where the operating system software and your files
are stored.

Ethernet port :— this is used to connect Raspberry Pi to a
network with a cable. Raspberry Pi can also
connect to a network via wireless LAN.
Audio jack :— you can connect headphones or speakers
here.
HDMI port :— this is where you connect the monitor (or
projector) that you are using to display the output
from the Raspberry Pi. If your monitor has speakers, you
can also use them to hear sound.
Micro USB power connector :— this is where you connect a
power supply. You should always do this last,
after you have connected all your other components.
GPIO ports :— these allow you to connect electronic
components such as LEDs and buttons to Raspberry Pi.
PR 2 >Pratical 2

AIM:-SDCardFormatandBurningRaspbian
Step1:DownloadtheRequiredSoftwareandFiles

Step2:GettheSDCardandtheCardReader

Getaminimum8GBclass10SDcardwithacardreader.Insertth
atcardintothecardreaderand plugthattotheUSBport.

Step3:ChecktheDriveinWhichtheSDCardIsMounted
*Go to my computer orMyPCand find the drive name
where the SD card ismounted.

Step4:FormattheSDCard
*•OpenSDCardFormatterandselectthedriveyounoticedinthe
previousstep.
•Clickonformatanddon'talteranyotheroptions.
•Whenformattingiscompleted,clickonOK.

Step5:WritetheOSontheSDCard
*.Open win32diskimager.
*Browse the .img file of Raspbian OS that was extracted
from the downloaded file.

Step6:EjecttheSDCard
*NowyourOSininstalledonyourRaspberryPi.
Pratical 3A

AIM:-
INSTALLINGTHERASPBIANOSONRASPBERRYPIANDCONNEC
TINGCOMPONENTS.
InstallRaspberryPiOS
The Raspberry Pi boots from a microSD card. You need to
install Raspberry Pi OS (formerly called Raspbian) on the
microSD card you will use with your Pi:
1. Connect the microSD card to your computer.
2. Download theRaspberry Pi Imagerand launch it.
3.Click CHOOSE DEVICE. Select your model of Pi.

4.Click CHOOSE OS. Select Raspberry Pi OS (other).


Select Raspberry Pi OS Full (64-bit) from the menu.
should be brought back to the initial launch screen.

5. Click CHOOSE STORAGE. From the list of devices, select


the microSD card you intend to use in your raspberry pi

**If no devices are listed, make sure your microSD card is


connected to your computer correctly.

6.Configure your Raspberry Pi for remote access. Click


Next. When prompted to apply OS
customization settings, select EDIT SETTINGS.

1.Select the checkbox next to Set username and password


and set a username (for example, your first name) and a
unique password that you will use to log into the Pi:
2. Select the SERVICES tab.
3. Check Enable SSH.
4.Double check your OS and Storage settings and then
clickYES:
oYou will be prompted to confirm erasing your microSD
card: selectYES.
Pratical 3B
AIM:InstallingRaspbianOSonVMwareworkstation.
1.Ahostsystemwithminimum:
2.8GBofmemory
3.AquadcoreCPU
4.500GBofharddrive
1)VM Ware Work station pororplayer application:0
Download VM Ware Work station
2)Raspberry Pi OSISO image to installon VM Ware Work
station.

step1.Fierup VM Ware Work station

Step2.SelectCustomConfigurationwizard
You can choose either Typical or Custom Wizard. We
recommend selecting Custom if you want toinstall with all
the configurations. If you are okay with default
configurations then go ahead with Typical configuratio

Step 3. Select Virtual Machine Hardware Compatibility

Go with the default option if you don't have the choice.

Step4.SelecttheOperatingSystemMedia
*Select 'I will install the operating system later' for an
interactive installation.

Step5.SelectGuestOperatingSystem

Step6.Name the Virtual Machine Name and location


Type a name and give the location details.
PRACTICAL NO 4
AIM:- LED BLINKING USING RASPBERRY PI - PYTHON
Hardware and Software Components:
Raspberry Pi Device
LED
Resistor 100 ohm
• Breadboard
Male/Female Jumper Wires
1. Step 1: Connecting the Circuit
Ensure that the Raspberry Pi is turned off until the circuit
is connected to avoid accidentally damaging a
components.
To build our physical circuit, start by inserting the
hardware components into our breadboard. Please re to
the below figure to guide you through the process.
• LED: The LED has 2 legs. The longer leg (anode) is
always connected to a positiv shorter leg (cathode) is
always connected to the ground.
• Resistor: You need a resistor to limit the amount of
current in the circuit. Withou current flow through the LED
will be much larger than required, which may damage the
circuit.
1. On the desktop, go the Start Menu and choose for the
PYTHON 3, as shown in figure below.
2. After that, PYHON will run and you will see a window as
shown in below figure.
3. After that, click on New File in File Menu, You will see a
new Window open
4.Save this file as blinky on the desktop,
1. Step 2: Writing the Python Code
import RPi.GPIO as GPIO import time.
GPIO.setmode (GPIO.BOARD)

GPIO.setup(7,GPIO.OUT) for i in range(10):

GPIO.output(7, True) print("LED IS FINALLY ON")

time.sleep(1)
GPIO.output (7, False) print("LED IS OFF")

time.sleep(1) print("PROGRAM COMPLETE!")


GPIO.cleanup()
Q Pratical 5
AIM:-PI CAMERA MODULE INTERFACE WITH RASPBERRY PI
USING PYTHON (CAPTURIN GIMAGE)
Hardware Requirements
Raspberry Pi, SD Card
Pi camera
Power supply
Ethernet Cable / Wi Fi
Monitor, Keyboard, Mouse (Optional, For without headless
connection)
Step 1: Update Raspberry Pi
step 2: install pi camera library sudo apt-get install
python-picamera
sudo apt-get install python3-picamer
Step 3: Enable Raspberry Pi Camera by using Raspberry Pi
Software Configuration Tool (raspi-config)
Select Interfacing Options Camera Enable
After this reboot the system, using sudo reboot command.
Step 4: After Reboot, Create a folder which is used to store
pictures captured by Pi Camera. (E.g.
/home/pi/Desktop/Visitors)

Step 5: Write a Python Script to capture images and save


hem in folder. (capture_picamera.py)

camera.capture() is used to capture the still pictures.


Provide Path(where to save) and parameter.

Writing the Python Code Capturing Image


import time

from picamera import PiCamera camera PiCamera()


camera.resolution = (1280,720) camera.start_preview()
time.sleep(5) camera.capture('/home/pi/Desktop/ty2.jpg')
camera.stop_preview()

Step 6: Execute above script using python (record.py)


Q Pratical 6

AIM: PI CAMERA MODULE INTERFACE WITH RASPBERRY PI


USING PYTHON(CAPTURING VIDEO)
Hardware Requirements
Raspberry Pi, SD Card
Pi camera Power supply
Ethernet Cable / Wi Fi
Monitor, Keyboard, Mouse (Optional, For without headless
connection)
step 2: install pi camera library
sudo apt-get install python- picamera sudo apt-get install
python3-picamer
Step 3: Enable Raspberry Pi Camera by using Raspberry
Pi Software Configuration Tool (raspi-config)
Step 4: After Reboot, Create a folder which is used to store
pictures captured by Pi Camera. (E.g.
/home/pi/Desktop/Visitors)
Step 5: Write a Python Script to capture images and save
them in folder. (capture_picamera.py)
start_recording() is used to start the recording of the
videos. Provide Path(where to save) and video name
parameter. Raspberry Pi' video supports .ht64 as
extension. stop_recording() is used to stop the recording.
To play the video, need to open a terminal window. Type
the command omxplayer videonme.h264 and Pr
Enter to play the video.
Writing the Python Code to Capturing Video
import time
from picamera import PiCamera
camera PiCamera()
camera.start_preview()

camera.start_recording('/home/pi/Desktop/video1.h264')

camera.wait_recording(15)

camera.stop_recording()

print("Finished Recording")
Step 6: Execute above script using python (record.py)
Q Pratical 7

Aim:- Interfacing 7-Segment Display with Raspberry Pi

Hardware Requirements

Raspberry Pi, SD Card

4 digit 7 segment display module

Power supply

Ethernet Cable / Wi Fi

Monitor, Keyboard, Mouse

Step 1: Connect 4 Digit 7 segment display module to the


Raspberry Pi

Pin1 Clock pin connects to the pin 40 on the Raspberry Pi

Pin2 Connect DIO pin for the Transferring the Data


connects to the fesical pin 38 on the Raspberry Pi Π

Pin3 connect vec pin to pin no 2 in the Raspberry Pi this


pin provided 5W to the module

Π Pin4 connects the ground pin to pin no 6 in the


Raspberry Pi

Step2: download the library and script for the given link.

Step4: Pythone code

9#!/usr/bin/env python # -- coding: utf-8 -- from time


import sleep import tm1637 try:

import thread

except ImportError: import thread as thread


#Initialize the clock (GND, VCC=3.3V, Example Pins are
DIO-20 and CLK21) Display = tm1637.TM1637(CLK=21,
DIO=20, brightness=1.0)

try:
print "Starting clock in the background (press CTRL + C to
stop):"

Display. StartClock(military_time=False)

print 'Continue Python script and tweak Display!"

sleep(5)

Display. ShowDoublepoint(False)

sleep(5)

loops = 3

while loops > 0:

for i in range(0, 10):

Display.SetBrightness(i / 10.0)

sleep(0.5)

loops -= 1

Display StopClock()

thread.interrupt_main()

except KeyboardInterrupt:

print "Properly closing the clock and open GPIO pins"


Display.cleanup()

Step5: execution of code


Open the terminal and provide the path of wear you saved
your code and enter the following command sudo python
clock.py

You might also like