Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
8 views30 pages

Lecture21 RaspberryPi

The document provides a comprehensive guide on setting up and using a Raspberry Pi, detailing its components, connection procedures, and initial setup steps. It includes instructions for installing the operating system, connecting peripherals, and using terminal commands. Additionally, it offers resources for further learning and references related to IoT and Raspberry Pi projects.

Uploaded by

tgandhibe22
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)
8 views30 pages

Lecture21 RaspberryPi

The document provides a comprehensive guide on setting up and using a Raspberry Pi, detailing its components, connection procedures, and initial setup steps. It includes instructions for installing the operating system, connecting peripherals, and using terminal commands. Additionally, it offers resources for further learning and references related to IoT and Raspberry Pi projects.

Uploaded by

tgandhibe22
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/ 30

IoT Based Systems

UEC 640

09/11/2025 1
Comparison between Raspberry Pi and Arduino

09/11/2025 Design for IoT (PEC232) 2


Raspberry Pi-3
The Raspberry Pi is a single computer board —
developed to encourage and aid the teaching of
programming and computing.

09/11/2025 Design for IoT (PEC232) 3


Raspberry Pi
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.

09/11/2025 4
Continued…

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.

09/11/2025 5
Connect your Raspberry Pi
Let’s connect up your Raspberry Pi and get
it running.
Check the slot on the underside of your
Raspberry Pi to see whether an SD card is
inside. If no SD card is there, then insert an
SD card with Raspbian installed (via
NOOBS).

Note: Many microSD cards come inside a


larger adapter — you can slide the smaller
card out using the lip at the bottom.

09/11/2025 6
Download and launch the Raspberry Pi Imager
Visit the Raspberry Pi downloads page.
Click on the link for the Raspberry Pi Imager that matches your operating system.

When the download finishes, click on it to launch the installer.

09/11/2025 7
Using the Raspberry Pi Imager
All data stored on the SD card will be
overwritten during formatting and lost
permanently, so make sure that you back up
the card or any files you want to keep
before running the installer.

When you launch the installer, your


operating system may try to block you
from running it. For example, Windows
may give the following message:

If you get this, click on More info and


then Run anyway

09/11/2025 8
Insert your SD card into the computer or
laptop’s SD card slot.

In the Raspberry Pi Imager, select the


OS that you want to install. The first
option, Raspberry Pi O, is the
recommended OS.

Select the SD card you would like to install it on. Different platforms will display
the drives in different ways. Mac OS, for example, will show you all drives including
you main operating system.
Note: Make sure you are selecting the correct drive. The drives memory capacity can
be a useful indication of which drive you are selecting.
09/11/2025 9
Once you have selected both the OS and the SD
card, a new WRITE button will appear.

Then simply click the WRITE button.


Wait for the Raspberry Pi Imager to finish
writing.

09/11/2025 10
Once you get the following message, you can
eject your SD card.

Find the USB connector end of your mouse’s


cable, and connect the mouse to a USB port on
your Raspberry Pi (it doesn’t matter which port
you use).

09/11/2025 11
Connect the keyboard in the same way.

Make sure your screen is plugged into a


wall socket and switched on.
Look at the HDMI port(s) on your
Raspberry Pi — notice that they have a flat
side on top.
Use a cable to connect the screen to the
Raspberry Pi’s HDMI port — use an adapter
if necessary.
09/11/2025 12
You could connect an optional second
screen in the same way.

Raspberry Pi 1, 2, 3
Connect your screen to the single HDMI port.

09/11/2025 13
Note: nothing will display on the screen, because
the Raspberry Pi is not running yet.
If you want to connect the Pi to the internet via
Ethernet, use an Ethernet cable to connect the
Ethernet port on the Raspberry Pi to an Ethernet
socket on the wall or on your internet router. You
don’t need to do this if you want to use wireless
connectivity, or if you don’t want to connect to the
internet.

If your screen has speakers, your Raspberry


Pi can play sound through these. Or you could
connect headphones or speakers to the audio
port.

09/11/2025 14
Plug the power supply into a socket and
then connect it to your Raspberry Pi’s USB
power port.

You should see a red light on your


Raspberry Pi and raspberries on the monitor.
Your Raspberry Pi then boots up into a
graphical desktop.

09/11/2025 15
Finish the setup
When you start your Raspberry Pi for the first time,
the Welcome to Raspberry Pi application will pop up
and guide you through the initial setup.
Click Next to start the setup.
Set your Country, Language, and Time zone, then
click Next again.

Enter a new password for your Raspberry


Pi and click Next.

09/11/2025 16
Connect to your Wi-Fi network by selecting its
name, entering the password, and clicking Next.

Note: if your Raspberry Pi model doesn’t have


wireless connectivity, you won’t see this screen.
Click Next let the wizard check for updates to
Raspbian and install them (this might take a little
while).
09/11/2025 17
Click Done or Reboot to finish the setup.

Note: you will only need to reboot if that’s


necessary to complete an update.

09/11/2025 18
A tour of Raspberry Pi
Now it’s time to take a tour of your Raspberry Pi.
Do you see the raspberry symbol in the top left-hand
corner? That’s where you access the menu: click on it to find
lots of applications.
Click on Accessories, and then click on Text Editor.

Type I just built a Raspberry


Pi computer in the window that
appears.

09/11/2025 19
Click on File, then choose Save, and
then click on Desktop and save the file
as rp.txt.

You should see an icon named rp.txt appear on


the desktop.

09/11/2025 20
Your file has been saved to your Raspberry
Pi’s SD card.

Close the text editor by clicking the X in


the top right-hand corner of the window.

Return to the menu, click on Shutdown,


and then click on Reboot.

When Raspberry Pi has rebooted, your text


file should still be there on the desktop.

Raspberry Pi runs a version of an operating system called Linux (Windows and macOS are
other operating systems). This operating system allows you to make things happen by typing
in commands instead of clicking on menu options. To try this out, click on
the Terminal symbol at the top of the screen:

09/11/2025 21
In the window that appears, type:

and then press Enter on the keyboard.


You can now see a list of the files and folders in your home directory.

Now type this command to change directory to the Desktop:

You have to press the Enter key after every command.


Then type:

09/11/2025 22
Can you see the text file you created?
Close the terminal window by clicking on the X.

Now drag rp.txt to the Wastebasket on the desktop so the


Raspberry Pi will be tidy for the next person using it.

09/11/2025 23
Installation of Libraries on Raspberry Pi
$ sudo apt-get install libblas-dev
$ sudo apt-get install liblapack-dev
$ sudo apt-get install gfortran
$ sudo apt-get install python-setuptools
$ sudoeasy_installscipy
$ ## previous might also work: python-scipy without all dependencies
$ sudo apt-get install python-matplotlib

09/11/2025 24
Terminal Commands
1. sudo apt-get update: This command updates the package list.
2. sudo apt-get upgrade: This command downloads and installs the updated packages.
3. sudo apt-get clean: This command cleans an old package files.
4. sudoraspi-config: This command configurations the tool for Raspberry Pi.
5. ls: This command shows the list of directory contents.
6. cd: This command changes the directories.
7. mkdir: This command creates a directory.
8. rmdir: This command removes a directory.
9. mv: This command moves a file.
10. tree -d: This command shows a tree of directories.
11. pwd: This command shows the current directory.
12. clear: This command is for clearing the terminal window.
13. sudo halt: This command makes the Raspberry Pi shut down.
14. sudo reboot: This command is to restart the Raspberry Pi.
15. startx: This command is to start the desktop environment (LXDE).
09/11/2025 25
Continued…
16. ifconfig: This command is to find IP address of Raspberry Pi
17. nano: This command is to edit a file.
18. cat: This command shows the content of a file.
19. rm: This command removes a file.
20. cp: This command is to copy a file or directory.
21. locate: This command is to locate a file.
22. sudo: This command is used in the Linux command line; sudo stands for “SuperUser Do.”
23. df: This command is to see the available disk space in each of the partitions in the system.
24. du: This command shows the disk usage of a file in the system.
25. tar: “tar -cvf” is for creating a .tar archive, -xvf to untar a tar archive, -tvf to list the contents
of the archive, etc.
26. zip, unzip: This command compresses the files into a zip archive, and unzip it to extract
files.
27. uname: The command “uname -a” prints most of information about the system.
28. chmod: This command is to change the permissions of files or directories.
29. ping: This command is to check your connection to a server.
30. sudo shutdown: This command is to shut down the Raspberry Pi.
09/11/2025 26
Browsing the web
You might want to connect your Raspberry Pi to the
internet. If you didn’t plug in an ethernet cable or connect to
a WiFi network during the setup, then you can connect now.
Click the icon with red crosses in the top right-hand corner
of the screen, and select your network from the drop-down
menu. You may need to select the network you should
choose.
Type in the password for your wireless network, then
click OK.

When your Pi is connected to the internet, you will see a


wireless LAN symbol instead of the red crosses.

09/11/2025 27
Click the web browser icon and search for Raspberry pi

09/11/2025 28
References
1. Sensor. Online:
https://ielm.ust.hk/dfaculty/ajay/courses/alp/ieem110/lecs/sensors/sensors.html
2. Vijay Madisetti, Arshdeep Bahga, “Internet of Things: A Hands-On Approach”
3. Adrian McEwen, Hakim Cassimally, “Designing the Internet of Things”, John Wiley (2014), 1st
ed.
4. Repeatability of Sensor. Online:
https://ocw.mit.edu/courses/mechanical-engineering/2-693-principles-ofoceanographic-instr
ument-systems-sensors-and-measurements-13-998-spring-2004/
5. Classification of actuators. Online URL: https://www.thomasnet.com/articles/pumps-valves-
accessories/typesof-actuators
6. “Electric bell”, ЮК/ Wikimedia Commons/, Published date: 18 February 2008, Online:
https://commons.wikimedia.org/wiki/File:Electric_Bell_animation.gif
7. https://projects.raspberrypi.org/en/projects/raspberry-pi-setting-up/6
8. “Axial piston pump”, MichaelFrey / Wikimedia Commons / CC-BY-SA-4.0 International/,
Published date: 11 August 2017, Online:
https://commons.wikimedia.org/wiki/File:Axialkolbenpumpe_-_einfache_Animation.gif
9. “Rigid chain actuator”, Catsquisher/ Wikimedia Commons/, Published date: 11 January
2011, Online: https://commons.wikimedia.org/wiki/File:Rigid_Chain_Actuator.gif
09/11/2025 29
Thanks !

09/11/2025 30

You might also like