Raspberry Pi, an efficient and cost effective series of small sized single-board computers developed in the United Kingdom by the Raspberry Pi foundation to promote the teaching of basic computer science in school. It’s a capable little PC which can be used for many of the things that your desktop PC does.
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
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: