Lab Assignment - 1 (IOTPP - CSE 4110)
Lab Assignment - 1 (IOTPP - CSE 4110)
ASSIGNMENT
Familiarization with Internet of
Things (IoT) concepts and the
01 Raspberry Pi Pico microcontroller
while gaining practical experience
using Python for simple IoT projects.
Aim:
Familiarization with Internet of Things (IoT) concepts and the Raspberry Pi Pico
microcontroller while gaining practical experience using Python for simple IoT projects.
Objectives:
1) Understanding IoT Fundamentals:
Gain foundational knowledge about IoT, which involves connecting physical devices to
the internet to collect and exchange data. Explore IoT architecture, communication
protocols, different IoT platforms, and real-world use cases.
Learn about the Raspberry Pi Pico microcontroller, a versatile and affordable embedded
system platform. Understand its capabilities, features, and its role as the central
processing unit in IoT projects.
3) Introduction to Python:
Explore the Python programming language, an essential tool for IoT development. Cover
key concepts such as interpreted languages, variables, keywords, operators, and data
types in Python. Understand how to import libraries and the basics of flow control,
including conditional statements and loops. Compare Python with other programming
languages and identify its applications in IoT.
Get acquainted with the online simulator "WOKWI," a valuable tool for IoT development
and simulation. Learn how to use it to create and test IoT projects.
Practice your newfound Python skills by programming the onboard LED of the
Raspberry Pi Pico. Create a program that turns the onboard LED on for 2 seconds and
then off for 1 second.
6) Building an External Circuit:
Constructing an external circuit and controlling it from the Raspberry Pi Pico. Develop a
program that instructs the Raspberry Pi Pico to turn an external LED on for 3 seconds
and off for 2 seconds.
Pre-Lab Questionnaire:
1) How does the Internet of Things (IoT) affect our everyday lives?
5) What is the difference between business IoT and Industrial IoT (IIOT)?
8) What is the key difference between IoT platforms and IoT protocols?
9) How does understanding IoT fundamentals, such as architecture and protocols, benefit
someone working on IoT projects?
13) What security measures are essential in IoT projects to protect against cyber threats?
14) What are some real-world examples of IoT applications that have a positive impact on
the environment?
17) In the Python section, can you list at least five keywords?
18) Consider the potential limitations of Python in IoT, such as memory constraints and
performance issues. How can these limitations be mitigated in real-world projects?
Objective 5
Onboard LED Blinking with Raspberry Pi Pico:
Practice your newfound Python skills by programming the onboard LED of the Raspberry Pi
Pico. Create a program that turns the onboard LED on for 2 seconds and then off for 1 second.
Code
5.1: write a program that turns the onboard LED on for 2 seconds and then off for 1 second.
Observation
Figure 1: (Simulation-based onboard LED blinking of Raspberry Pi Pico on for 2 seconds and then off
for 1 second.)
INTERNET OF THINGS (IOT) PROJECT USING PYTHON (CSE 4110)
Familiarization with Internet of Things (IoT) concepts and the Raspberry Pi Pico microcontroller while gaining practical
experience using Python for simple IoT projects.
Figure 2: (Hardware Implementation based onboard LED blinking of Raspberry Pi Pico on for 2
seconds and then off for 1 second.)
Objective 6
Building an External Circuit:
Constructing an external circuit and controlling it from the Raspberry Pi Pico. Develop a
program that instructs the Raspberry Pi Pico to turn an external LED on for 3 seconds and off
for 2 seconds.
330
GP15
GP28
(Figure 3 : Simple LED Circuit for blinking an LED) (Figure 4: Hardware Implementation to blink an LED)
Code
6.1: write a program that turns the external LED on for 3 seconds and then off for 2 seconds.
Figure 5: (Simulation-based Simple External LED Circuit for blinking an external LED on for 3 seconds
and off for 2 seconds using Raspberry Pi Pico.)
Figure 6: (Hardware Implementation based Simple External LED Circuit for blinking the external
LED on for 3 seconds and off for 2 seconds using Raspberry Pi Pico.)
330
GP15
GP28
Figure 7: Simple circuit to blink both the onboard LED and External LED, with each LED being on for
5 seconds and then off for 5 seconds using Raspberry Pi Pico
Code
7.1: write a program to blink both the onboard LED and External LED, with each LED
being on for 5 seconds and then off for 5 seconds using Raspberry Pi Pico.
Figure 8: (Simulation-based setup to blink both on-board and external LED using Raspberry Pi Pico)
Figure 9: (Hardware Implementation based setup to blink both on-board and external LED using
Raspberry Pi Pico)
Conclusion:
4) What are the advantages and disadvantages of using the Raspberry Pi Pico as the
microcontroller for IoT projects compared to other microcontrollers?
8) Discuss potential challenges or issues that students might face when building an external
circuit and how could they troubleshoot these problems effectively.
9) Why is it important to learn to synchronize the onboard and external LEDs in the final
part of the experiment, even if it may seem like a simple exercise?
10) Reflect on the trade-offs between using a hardware-based Raspberry Pi Pico and a
software-based simulator like "WOKWI" for IoT experiments in terms of realism, cost,
and learning experience.
INTERNET OF THINGS (IOT) PROJECT USING PYTHON (CSE 4110)
Familiarization with Internet of Things (IoT) concepts and the Raspberry Pi Pico microcontroller while gaining practical
experience using Python for simple IoT projects.
Answers to Post-Lab Questions