SlideShare uma empresa Scribd logo
1 de 26
An Introductory Session
on
Raspberry PI
By: Pravesh Sahu
Raspberry Pi
• An efficient and cost effective
series of small sized single-
board computer.
• developed in the United
Kingdom by the Raspberry Pi
foundation.
• It’s a capable little PC which
can be used for many of the
things that your desktop PC
does.
A Cost Effective, Small, Powerful Computer
What’s makes it so special?
• Open Source Operating System
• Low Power
• Cost Efficient
• Instant Start-up
• Easy to Use
• Plug and play
• Supported 1080p HD video
• Can act as single platform for extensive programming
experience
It can be plugged with your TV, can be used for many of the
things that your average desktop does.
Raspberry PI models
Your tiny, desktop computer
Raspberry
Pi
3
• RAM 512 MB,1GB
• USB 2.0
• 1.4GHz CPU Clock
• 40 pins GPIO
• WiFi 2.4GHz and
5GHz 802.11
b/g/n/ac
• Bluetooth 5.0
Raspberry PI models
Your tiny, desktop computer
Raspberry
Pi
4
• Your choice of RAM 1GB, 2GB, 4GB, or
8GB.
• USB 3
• 1.5GHz CPU Clock
• 2x USB3.0 + 2x USB2.0 + USB-C OTG
• 2x micro HDMI
• 40-pins GPIO
• microSD
• WiFi 2.4GHz and 5GHz 802.11
b/g/n/ac
• Bluetooth 5.0
Raspberry PI models
Your tiny, desktop computer
Raspberry
Pi
Zero
WH
• RAM 512 MB
• USB 2.0
• 1GHz CPU Clock
• 40 pins GPIO, WiFi,
Bluetooth 4.1
Operating System
Your tiny, desktop computer
Raspberry Pi OS
Your Raspberry Pi needs an operating system
to work. This is it. Raspberry Pi OS (previously
called Raspbian) is official supported
operating system.
Some Other
Operating systems
•Ubuntu MATE
•Pidora
•Linutop
•SARPi
•Arch Linux ARM
•Gentoo Linux
•FreeBSD
•Kali Linux
8 GB (or more) SD card:
That is the first and biggest pain. You must have a SD card
of at least 8 GB. Raspberry Pi boots only from a SD card
then you might use external USB storage, but it won’t
breathe without the SD card.
Things You Need To Get Your Raspberry
Pi Working
Power supply:
For the Raspberry Pi 4, you need a USB-C power
source that provides at least 3 amps / 5 volts,
but for other Raspberry Pis, you need a micro
USB connection that offers at least 2.5 amps
and the same 5 volts.
Things You Need To Get Your Raspberry
Pi Working
HDMI cable or Video RCA
The next thing you need is a display. You can
hook up the Raspberry Pi with a digital TV using
HDMI or to the older generation TV/monitor
using composite Video RCA to RCA connector.
There is absolutely no support for VGA.
Things You Need To Get Your Raspberry
Pi Working
Keyboard and Mouse
Now when you have Raspberry Pi powered, booted and
connected to a screen you definitely need mouse and
keyboard to interact. There is no support for PS2
keyboard and mouse and rightly so. No need to support
obsolete technology in a gen-next device.
Things You Need To Get Your Raspberry
Pi Working
Installation
With Raspberry PI OS
Go -> https://www.raspberrypi.org/software/
Installation
With Raspberry PI OS
Installation
With Raspberry PI OS
Installation
With Raspberry PI OS
Installation
With Raspberry PI OS
Put the microSD card in your RPi and boot
up
Once the disc image has been written to the microSD
card, you’re ready to go! Put that microSD card into your
Raspberry Pi, plug in the peripherals and power source,
and enjoy. The current edition to Raspberry PI OS will
boot directly to the desktop.
What is Python?
Python is a popular programming language. It was created by
Guido van Rossum, and released in 1991.
It is used for:
web development (server-side),
software development,
mathematics,
system scripting.
• Python can be used on a server to create web applications.
• Python can be used alongside software to create workflows.
• Python can connect to database systems. It can also read and
modify files.
•Python can be used to handle big data and perform complex
mathematics.
•Python can be used for rapid prototyping, or for production-
ready software development.
What can Python do?
•Python works on different platforms (Windows, Mac, Linux,
Raspberry Pi, etc).
•Python has a simple syntax similar to the English language.
•Python has syntax that allows developers to write programs
with fewer lines than some other programming languages.
•Python runs on an interpreter system, meaning that code
can be executed as soon as it is written. This means that
prototyping can be very quick.
•Python can be treated in a procedural way, an object-
oriented way or a functional way.
Why Python?
Writing the Python Code to blink the LED
Getting Started
With the circuit created we need to
write the Python script to blink the
LED. Before we start writing the
software we first need to install the
Raspberry Pi GPIO Python module.
This is a library that allows us to
access the GPIO port directly from
Python.
Writing the Python Code to blink the LED
Getting Started
To install the Python library open a terminal and execute
the following
$ sudo apt-get install python-rpi.gpio python3-
rpi.gpio
With the library installed now open your favorite Python IDE.
Writing the Python Code to blink the LED
Python Script
Our script needs to do the following:
•Initialize the GPIO ports
•Turn the LED on and off in 1 second intervals
To initialize the GPIO ports on the Raspberry Pi we need
to first import the Python library,
setup pin 8 as an output pin.
Writing the Python Code to blink the LED
Python Script
Next we need to turn the LED on and off in 1 second intervals by
setting the output pin to either high (on) or low (off). We do this
inside a infinite loop so our program keep executing until we
manually stop it.
Writing the Python Code to blink the LED
Python Script
Combining the initialization and the blink code should give
you the following full Python program:
Writing the Python Code to blink the LED
Python Script
$ python blinking_led.py
With our program finished, save it as blinking_led.py and run it
either inside your IDE or in the console with:
THANKYOU

Mais conteúdo relacionado

Mais procurados

Presentation on Raspberry pi
Presentation on Raspberry piPresentation on Raspberry pi
Presentation on Raspberry piOpenDev
 
Raspberry Pi Presentation
Raspberry Pi PresentationRaspberry Pi Presentation
Raspberry Pi PresentationGeekizer
 
Introduction to raspberry pi
Introduction to raspberry piIntroduction to raspberry pi
Introduction to raspberry pipraveen_23
 
Raspberry Pi Technology
Raspberry Pi TechnologyRaspberry Pi Technology
Raspberry Pi TechnologyRavi Basil
 
Raspberrypi best ppt
Raspberrypi best ppt Raspberrypi best ppt
Raspberrypi best ppt SOMRAJ GAUTAM
 
Raspberry Pi Introduction
Raspberry Pi IntroductionRaspberry Pi Introduction
Raspberry Pi IntroductionMichal Sedlak
 
My presentation raspberry pi
My presentation raspberry piMy presentation raspberry pi
My presentation raspberry piHusainBhaldar21
 
Raspberry Pi Session - 22_11_2014
Raspberry Pi Session - 22_11_2014Raspberry Pi Session - 22_11_2014
Raspberry Pi Session - 22_11_2014Mandeesh Singh
 
Introduction to raspberry pi
Introduction to raspberry piIntroduction to raspberry pi
Introduction to raspberry pi동호 손
 
Raspberry pi on seminar documentation
Raspberry pi on seminar documentationRaspberry pi on seminar documentation
Raspberry pi on seminar documentationGeorgekutty Francis
 
Raspberry pi : an introduction
Raspberry pi : an introductionRaspberry pi : an introduction
Raspberry pi : an introductionLTG Oxford
 

Mais procurados (20)

Presentation on Raspberry pi
Presentation on Raspberry piPresentation on Raspberry pi
Presentation on Raspberry pi
 
Raspberry Pi Presentation
Raspberry Pi PresentationRaspberry Pi Presentation
Raspberry Pi Presentation
 
Raspberry pi
Raspberry pi Raspberry pi
Raspberry pi
 
Introduction to raspberry pi
Introduction to raspberry piIntroduction to raspberry pi
Introduction to raspberry pi
 
Raspberry Pi Technology
Raspberry Pi TechnologyRaspberry Pi Technology
Raspberry Pi Technology
 
Raspberrypi best ppt
Raspberrypi best ppt Raspberrypi best ppt
Raspberrypi best ppt
 
Introduction to Raspberry PI
Introduction to Raspberry PIIntroduction to Raspberry PI
Introduction to Raspberry PI
 
Raspberry-Pi
Raspberry-PiRaspberry-Pi
Raspberry-Pi
 
Raspberry pi
Raspberry piRaspberry pi
Raspberry pi
 
Raspberry Pi Introduction
Raspberry Pi IntroductionRaspberry Pi Introduction
Raspberry Pi Introduction
 
My presentation raspberry pi
My presentation raspberry piMy presentation raspberry pi
My presentation raspberry pi
 
Raspberry pi
Raspberry piRaspberry pi
Raspberry pi
 
Raspberry Pi Session - 22_11_2014
Raspberry Pi Session - 22_11_2014Raspberry Pi Session - 22_11_2014
Raspberry Pi Session - 22_11_2014
 
Raspberry PI
Raspberry PIRaspberry PI
Raspberry PI
 
Introduction to raspberry pi
Introduction to raspberry piIntroduction to raspberry pi
Introduction to raspberry pi
 
Raspberry pi
Raspberry pi Raspberry pi
Raspberry pi
 
Raspberry pi complete setup
Raspberry pi complete setupRaspberry pi complete setup
Raspberry pi complete setup
 
Raspberry pi on seminar documentation
Raspberry pi on seminar documentationRaspberry pi on seminar documentation
Raspberry pi on seminar documentation
 
Raspberry pi : an introduction
Raspberry pi : an introductionRaspberry pi : an introduction
Raspberry pi : an introduction
 
Rasberry pi
 Rasberry pi Rasberry pi
Rasberry pi
 

Semelhante a Raspberry pi

Introduction To Raspberry Pi with Simple GPIO pin Control
Introduction To Raspberry Pi with Simple GPIO pin ControlIntroduction To Raspberry Pi with Simple GPIO pin Control
Introduction To Raspberry Pi with Simple GPIO pin ControlPradip Bhandari
 
Raspberry Pi - Unlocking New Ideas for Your Library
Raspberry Pi - Unlocking New Ideas for Your LibraryRaspberry Pi - Unlocking New Ideas for Your Library
Raspberry Pi - Unlocking New Ideas for Your LibraryBrian Pichman
 
Unit 6 - PART2.pptx
Unit 6 - PART2.pptxUnit 6 - PART2.pptx
Unit 6 - PART2.pptxBLACKSPAROW
 
Raspberry Pi Introductory Lecture
Raspberry Pi Introductory LectureRaspberry Pi Introductory Lecture
Raspberry Pi Introductory LectureSyed Umaid Ahmed
 
IoT for data science Module 5 - Raspberry Pi.pptx
IoT for data science Module 5 - Raspberry Pi.pptxIoT for data science Module 5 - Raspberry Pi.pptx
IoT for data science Module 5 - Raspberry Pi.pptxMadhurimaDas52
 
Raspbeery Pi : An Introduction
Raspbeery Pi : An IntroductionRaspbeery Pi : An Introduction
Raspbeery Pi : An IntroductionVatsal N Shah
 
Raspberry Pi training in Ludhiana
Raspberry Pi training in LudhianaRaspberry Pi training in Ludhiana
Raspberry Pi training in LudhianaE2MATRIX
 
Raspberry Pi Training in Mohali
Raspberry Pi Training in MohaliRaspberry Pi Training in Mohali
Raspberry Pi Training in MohaliE2MATRIX
 
Raspberry Pi Training in Chandigarh
Raspberry Pi Training in ChandigarhRaspberry Pi Training in Chandigarh
Raspberry Pi Training in ChandigarhE2MATRIX
 
Raspberry Pi Training in Phagwara
Raspberry Pi Training in PhagwaraRaspberry Pi Training in Phagwara
Raspberry Pi Training in PhagwaraE2MATRIX
 
Getting started with Raspberry Pi - By Ibrahim
Getting started with Raspberry Pi - By IbrahimGetting started with Raspberry Pi - By Ibrahim
Getting started with Raspberry Pi - By IbrahimMurugadoss Balasubramanian
 
Raspberry Pi Training in Jalandhar
Raspberry Pi Training in JalandharRaspberry Pi Training in Jalandhar
Raspberry Pi Training in JalandharE2MATRIX
 

Semelhante a Raspberry pi (20)

Introduction To Raspberry Pi with Simple GPIO pin Control
Introduction To Raspberry Pi with Simple GPIO pin ControlIntroduction To Raspberry Pi with Simple GPIO pin Control
Introduction To Raspberry Pi with Simple GPIO pin Control
 
Raspberry Pi - Unlocking New Ideas for Your Library
Raspberry Pi - Unlocking New Ideas for Your LibraryRaspberry Pi - Unlocking New Ideas for Your Library
Raspberry Pi - Unlocking New Ideas for Your Library
 
Unit 6 - PART2.pptx
Unit 6 - PART2.pptxUnit 6 - PART2.pptx
Unit 6 - PART2.pptx
 
Raspberry pi
Raspberry piRaspberry pi
Raspberry pi
 
Raspberry Pi Introductory Lecture
Raspberry Pi Introductory LectureRaspberry Pi Introductory Lecture
Raspberry Pi Introductory Lecture
 
IoT for data science Module 5 - Raspberry Pi.pptx
IoT for data science Module 5 - Raspberry Pi.pptxIoT for data science Module 5 - Raspberry Pi.pptx
IoT for data science Module 5 - Raspberry Pi.pptx
 
Lecture 8
Lecture 8Lecture 8
Lecture 8
 
Raspbeery Pi : An Introduction
Raspbeery Pi : An IntroductionRaspbeery Pi : An Introduction
Raspbeery Pi : An Introduction
 
Raaaaassspberry pi
Raaaaassspberry piRaaaaassspberry pi
Raaaaassspberry pi
 
RASPBERRY Pi.pptx
RASPBERRY Pi.pptxRASPBERRY Pi.pptx
RASPBERRY Pi.pptx
 
Raspberry Pi ppt.pptx
Raspberry Pi ppt.pptxRaspberry Pi ppt.pptx
Raspberry Pi ppt.pptx
 
Raspberry Pi ppt.pptx
Raspberry Pi ppt.pptxRaspberry Pi ppt.pptx
Raspberry Pi ppt.pptx
 
Raspberry pi
Raspberry piRaspberry pi
Raspberry pi
 
Raspberry Pi
Raspberry PiRaspberry Pi
Raspberry Pi
 
Raspberry Pi training in Ludhiana
Raspberry Pi training in LudhianaRaspberry Pi training in Ludhiana
Raspberry Pi training in Ludhiana
 
Raspberry Pi Training in Mohali
Raspberry Pi Training in MohaliRaspberry Pi Training in Mohali
Raspberry Pi Training in Mohali
 
Raspberry Pi Training in Chandigarh
Raspberry Pi Training in ChandigarhRaspberry Pi Training in Chandigarh
Raspberry Pi Training in Chandigarh
 
Raspberry Pi Training in Phagwara
Raspberry Pi Training in PhagwaraRaspberry Pi Training in Phagwara
Raspberry Pi Training in Phagwara
 
Getting started with Raspberry Pi - By Ibrahim
Getting started with Raspberry Pi - By IbrahimGetting started with Raspberry Pi - By Ibrahim
Getting started with Raspberry Pi - By Ibrahim
 
Raspberry Pi Training in Jalandhar
Raspberry Pi Training in JalandharRaspberry Pi Training in Jalandhar
Raspberry Pi Training in Jalandhar
 

Último

Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfPatidar M
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17Celine George
 
CLASSIFICATION OF ANTI - CANCER DRUGS.pptx
CLASSIFICATION OF ANTI - CANCER DRUGS.pptxCLASSIFICATION OF ANTI - CANCER DRUGS.pptx
CLASSIFICATION OF ANTI - CANCER DRUGS.pptxAnupam32727
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxlancelewisportillo
 
4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptx4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptxmary850239
 
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...DhatriParmar
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Projectjordimapav
 
Narcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdfNarcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdfPrerana Jadhav
 
Q-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQ-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQuiz Club NITW
 
Expanded definition: technical and operational
Expanded definition: technical and operationalExpanded definition: technical and operational
Expanded definition: technical and operationalssuser3e220a
 
Congestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationCongestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationdeepaannamalai16
 
Mythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWMythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWQuiz Club NITW
 
Scientific Writing :Research Discourse
Scientific  Writing :Research  DiscourseScientific  Writing :Research  Discourse
Scientific Writing :Research DiscourseAnita GoswamiGiri
 
4.9.24 School Desegregation in Boston.pptx
4.9.24 School Desegregation in Boston.pptx4.9.24 School Desegregation in Boston.pptx
4.9.24 School Desegregation in Boston.pptxmary850239
 
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxGrade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxkarenfajardo43
 
How to Fix XML SyntaxError in Odoo the 17
How to Fix XML SyntaxError in Odoo the 17How to Fix XML SyntaxError in Odoo the 17
How to Fix XML SyntaxError in Odoo the 17Celine George
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4JOYLYNSAMANIEGO
 

Último (20)

Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdf
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17
 
CLASSIFICATION OF ANTI - CANCER DRUGS.pptx
CLASSIFICATION OF ANTI - CANCER DRUGS.pptxCLASSIFICATION OF ANTI - CANCER DRUGS.pptx
CLASSIFICATION OF ANTI - CANCER DRUGS.pptx
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
 
4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptx4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptx
 
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Project
 
Narcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdfNarcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdf
 
Q-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQ-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITW
 
Expanded definition: technical and operational
Expanded definition: technical and operationalExpanded definition: technical and operational
Expanded definition: technical and operational
 
Congestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationCongestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentation
 
Mythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWMythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITW
 
Scientific Writing :Research Discourse
Scientific  Writing :Research  DiscourseScientific  Writing :Research  Discourse
Scientific Writing :Research Discourse
 
4.9.24 School Desegregation in Boston.pptx
4.9.24 School Desegregation in Boston.pptx4.9.24 School Desegregation in Boston.pptx
4.9.24 School Desegregation in Boston.pptx
 
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxGrade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
 
Mattingly "AI & Prompt Design: Large Language Models"
Mattingly "AI & Prompt Design: Large Language Models"Mattingly "AI & Prompt Design: Large Language Models"
Mattingly "AI & Prompt Design: Large Language Models"
 
How to Fix XML SyntaxError in Odoo the 17
How to Fix XML SyntaxError in Odoo the 17How to Fix XML SyntaxError in Odoo the 17
How to Fix XML SyntaxError in Odoo the 17
 
Faculty Profile prashantha K EEE dept Sri Sairam college of Engineering
Faculty Profile prashantha K EEE dept Sri Sairam college of EngineeringFaculty Profile prashantha K EEE dept Sri Sairam college of Engineering
Faculty Profile prashantha K EEE dept Sri Sairam college of Engineering
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4
 

Raspberry pi

  • 2. Raspberry Pi • An efficient and cost effective series of small sized single- board computer. • developed in the United Kingdom by the Raspberry Pi foundation. • It’s a capable little PC which can be used for many of the things that your desktop PC does. A Cost Effective, Small, Powerful Computer
  • 3. What’s makes it so special? • Open Source Operating System • Low Power • Cost Efficient • Instant Start-up • Easy to Use • Plug and play • Supported 1080p HD video • Can act as single platform for extensive programming experience It can be plugged with your TV, can be used for many of the things that your average desktop does.
  • 4. Raspberry PI models Your tiny, desktop computer Raspberry Pi 3 • RAM 512 MB,1GB • USB 2.0 • 1.4GHz CPU Clock • 40 pins GPIO • WiFi 2.4GHz and 5GHz 802.11 b/g/n/ac • Bluetooth 5.0
  • 5. Raspberry PI models Your tiny, desktop computer Raspberry Pi 4 • Your choice of RAM 1GB, 2GB, 4GB, or 8GB. • USB 3 • 1.5GHz CPU Clock • 2x USB3.0 + 2x USB2.0 + USB-C OTG • 2x micro HDMI • 40-pins GPIO • microSD • WiFi 2.4GHz and 5GHz 802.11 b/g/n/ac • Bluetooth 5.0
  • 6. Raspberry PI models Your tiny, desktop computer Raspberry Pi Zero WH • RAM 512 MB • USB 2.0 • 1GHz CPU Clock • 40 pins GPIO, WiFi, Bluetooth 4.1
  • 7. Operating System Your tiny, desktop computer Raspberry Pi OS Your Raspberry Pi needs an operating system to work. This is it. Raspberry Pi OS (previously called Raspbian) is official supported operating system. Some Other Operating systems •Ubuntu MATE •Pidora •Linutop •SARPi •Arch Linux ARM •Gentoo Linux •FreeBSD •Kali Linux
  • 8. 8 GB (or more) SD card: That is the first and biggest pain. You must have a SD card of at least 8 GB. Raspberry Pi boots only from a SD card then you might use external USB storage, but it won’t breathe without the SD card. Things You Need To Get Your Raspberry Pi Working
  • 9. Power supply: For the Raspberry Pi 4, you need a USB-C power source that provides at least 3 amps / 5 volts, but for other Raspberry Pis, you need a micro USB connection that offers at least 2.5 amps and the same 5 volts. Things You Need To Get Your Raspberry Pi Working
  • 10. HDMI cable or Video RCA The next thing you need is a display. You can hook up the Raspberry Pi with a digital TV using HDMI or to the older generation TV/monitor using composite Video RCA to RCA connector. There is absolutely no support for VGA. Things You Need To Get Your Raspberry Pi Working
  • 11. Keyboard and Mouse Now when you have Raspberry Pi powered, booted and connected to a screen you definitely need mouse and keyboard to interact. There is no support for PS2 keyboard and mouse and rightly so. No need to support obsolete technology in a gen-next device. Things You Need To Get Your Raspberry Pi Working
  • 12. Installation With Raspberry PI OS Go -> https://www.raspberrypi.org/software/
  • 16. Installation With Raspberry PI OS Put the microSD card in your RPi and boot up Once the disc image has been written to the microSD card, you’re ready to go! Put that microSD card into your Raspberry Pi, plug in the peripherals and power source, and enjoy. The current edition to Raspberry PI OS will boot directly to the desktop.
  • 17. What is Python? Python is a popular programming language. It was created by Guido van Rossum, and released in 1991. It is used for: web development (server-side), software development, mathematics, system scripting.
  • 18. • Python can be used on a server to create web applications. • Python can be used alongside software to create workflows. • Python can connect to database systems. It can also read and modify files. •Python can be used to handle big data and perform complex mathematics. •Python can be used for rapid prototyping, or for production- ready software development. What can Python do?
  • 19. •Python works on different platforms (Windows, Mac, Linux, Raspberry Pi, etc). •Python has a simple syntax similar to the English language. •Python has syntax that allows developers to write programs with fewer lines than some other programming languages. •Python runs on an interpreter system, meaning that code can be executed as soon as it is written. This means that prototyping can be very quick. •Python can be treated in a procedural way, an object- oriented way or a functional way. Why Python?
  • 20. Writing the Python Code to blink the LED Getting Started With the circuit created we need to write the Python script to blink the LED. Before we start writing the software we first need to install the Raspberry Pi GPIO Python module. This is a library that allows us to access the GPIO port directly from Python.
  • 21. Writing the Python Code to blink the LED Getting Started To install the Python library open a terminal and execute the following $ sudo apt-get install python-rpi.gpio python3- rpi.gpio With the library installed now open your favorite Python IDE.
  • 22. Writing the Python Code to blink the LED Python Script Our script needs to do the following: •Initialize the GPIO ports •Turn the LED on and off in 1 second intervals To initialize the GPIO ports on the Raspberry Pi we need to first import the Python library, setup pin 8 as an output pin.
  • 23. Writing the Python Code to blink the LED Python Script Next we need to turn the LED on and off in 1 second intervals by setting the output pin to either high (on) or low (off). We do this inside a infinite loop so our program keep executing until we manually stop it.
  • 24. Writing the Python Code to blink the LED Python Script Combining the initialization and the blink code should give you the following full Python program:
  • 25. Writing the Python Code to blink the LED Python Script $ python blinking_led.py With our program finished, save it as blinking_led.py and run it either inside your IDE or in the console with: