0% found this document useful (0 votes)
98 views5 pages

Labsheet

This document provides instructions for a lab exercise on introducing Raspberry Pi. The objectives are to install Raspbian OS, GPIO libraries, and implement a simple light switch. Equipment includes a Raspberry Pi, SD card, breadboard, LED, resistor, and button. Background information is provided on Raspberry Pi and Raspbian OS. A 17-step procedure guides setting up the Raspberry Pi, installing Raspbian, building a breadboard circuit with an LED and button, running Python code to control the LED with the button, and accessing the Raspberry Pi remotely via SSH.

Uploaded by

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

Labsheet

This document provides instructions for a lab exercise on introducing Raspberry Pi. The objectives are to install Raspbian OS, GPIO libraries, and implement a simple light switch. Equipment includes a Raspberry Pi, SD card, breadboard, LED, resistor, and button. Background information is provided on Raspberry Pi and Raspbian OS. A 17-step procedure guides setting up the Raspberry Pi, installing Raspbian, building a breadboard circuit with an LED and button, running Python code to control the LED with the button, and accessing the Raspberry Pi remotely via SSH.

Uploaded by

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

MSc in Information Technology

Semester 1
Lab Exercise 1

IT5070 – Internet of Things (IoT) 2021

Lab 1: Introduction to Raspberry Pi


Objectives:
• Installing Raspbian OS on Raspberry Pi
• Installing GPIO Libraries on Raspberry Pi
• Implementing a simple light switch on Raspberry Pi

Equipment:
• Raspberry Pi 3 Model B/ Raspberry Pi 4 Model B
• Power Supply for Raspberry Pi (5V and 2.5A DC)
• Micro SD Card (Class 10)
• Micro SD Card Reader
• HDMI to VGA Converter
• Breadboard
• Jumper Wires
• An LED
• 330Ω Resistor
• A push button switch

Background:
A single-board computer (SBC) is a complete computer built on a single circuit board,
with microprocessor(s), memory, input/output (I/O) and other features required of a functional
computer. Raspberry Pi is one of the most widely used SBCs in IoT applications due to its low
cost and high performance. Raspberry Pi 3 has WiFi and Bluetooth built into it which makes it an
better choice for IoT applications. The Linux based operating system “Raspbian” is the
recommended operating system for the Raspberry Pi while there are other operating systems
such as Ubuntu MATE, Windows 10 IoT Core and etc. Refer the below figure to identify the parts
of the Raspberry Pi SBC.

1
Procedure:
1. Insert the SD card into the SD card reader and plug it into the PC.

2. Download Raspberry Pi Imager for Windows/macOS/Ubuntu.

3. Run the executable file and install the Raspberry Pi Imager.

4. Select the Operating System: Select “Raspberry Pi OS (32 bit) – A port of Debian with the
Raspberry Pi Desktop (Recommended)”

5. Select the Storage: Select the proper SD card.

6. Write and verify the SD card.

7. Eject the SD card from the PC and plug it into the Raspberry Pi as shown below.

8. Place the Raspberry Pi inside the enclosure and connect the keyboard, mouse, power supply
and the monitor using HDMI to VGA converter.

2
9. Following screen will appear after powering up the device.

Select the Raspbian from the operating systems list and click install.
Wait for the setup to finish and reboot the Raspberry Pi.

10. A breadboard is used to prototype circuits before manufacturing them. The internal
connections in a breadboard is given below.

3
11. Build the following circuit on the breadboard.

This setup could be used to develop a simple program on Raspberry Pi to switch on the LED
using push button input.

12. Open the terminal window and type the command : gpio readall

13. Copy the following python code into the desktop and run it using a terminal window.

4
14. SSH stands for “Secure Socket Shell” which is a secure network protocol which can be used
to access a remote computer. Raspberry Pi can be accessed via SSH by following the steps
below.
a. Launch Raspberry Pi Configuration from the Preferences Menu.
b. Navigate to the Interfaces tab.
c. Select Enabled for SSH.
d. Click Ok. This need to be done only the first time connecting via SSH.

15. Open a Terminal in the Raspberry Pi and type hostname -I. This will print the IP Address of
the Raspberry Pi in the Terminal.

16. Open Putty SSH Client and select SSH connection type. Then enter the IP address of the
Raspberry Pi to connect with raspberry pi.

17. Launch the push botton control python program on raspberry pi using SSH.

You might also like