Labsheet
Labsheet
Semester 1
Lab Exercise 1
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.
4. Select the Operating System: Select “Raspberry Pi OS (32 bit) – A port of Debian with the
Raspberry Pi Desktop (Recommended)”
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.