DRE2213
BTE1522
The world is digital, but life is analog..
Today’s Raspberry Pi class focused on hands-on exercises using the UMPSA STEM Cube, a picosatellite powered by a Raspberry Pi Pico. Students completed Activities 1, 2, and 3, where they explored digital output and input by turning LEDs on and off, blinking them, and reading inputs from switches and sliders.
The objective of these activities is to transition students from learning Python in a simulated environment, where they developed a slider game, to implementing Python in physical computing. Through the exercises, students practiced applying delay functions, making circuit connections, and importing MicroPython libraries into the Thonny IDE. The UMPSA STEM Cube serves as an introductory picosatellite equipped with basic sensors, providing a practical platform for students to apply their knowledge in physical computing.
DRE2213
BTE1522
Please submit your assignment report in KALAM. Upload the following:-
DRE2213
RAJA RE23313, SKANTHANESSH RE23028, ARIFF DANIEL RE22197
BTE1522
In the latest session of the Global Classroom Initiative for DRE2213 Programming and Data Structure and BTE1522 Innovation (Python Programming) students were privileged to attend a talk by Prof. Ansgar Meroth from Helbron University. Prof. Ansgar delivered a comprehensive overview of IoT networks, particularly as applied to agriculture. This talk aligned perfectly with our BTE1522 and DRE2213 course’s focus, as students in the DRE course gain hands-on experience in Python programming, Raspberry Pi programming, and embedded systems.
Prof. Ansgar’s lecture began with the foundational elements of IoT, including sensors, network architecture, and the various considerations in building robust IoT solutions. Moving deeper, he shared insights on the types of sensors used, architecture design choices, and a project demonstration from his own classes. The talk’s focus on agricultural IoT applications illustrated the immense potential of these technologies to transform farming through precision monitoring and automation.
Key Points Covered in the Session
Q&A Session with Prof. Ansgar
The session concluded with an engaging Q&A, where Prof. A addressed various thoughtful questions from students, demonstrating his deep expertise and providing practical guidance. Here are some of the key questions asked and the responses-
1. What are the critical components in developing a reliable and quality IoT solution?
There is a critical need for high-quality sensors, a robust network architecture, and efficient data handling techniques. Reliability can often hinge on the durability of sensors in harsh environments, as well as on efficient protocols for data transmission.
2. What are the considerations for choosing the right sensor in IoT solutions if cost isn’t an issue?
Prioritizing sensor accuracy, durability, and compatibility with other IoT components are recommended. Environmental factors, such as weather and soil conditions, also play a role in sensor selection for agricultural applications.
3. How can we optimize performance in IoT systems with limited power on Raspberry Pi?
Sleep modes and power-efficient protocols, such as MQTT, which is designed for minimal data transfer could be considered. Edge processing can also reduce energy usage by minimizing the amount of data sent to the cloud.
4. How do you ensure reliable data transmission and handling in IoT systems that operate on edge devices?
Using reliable networking protocols and setting up redundant systems to handle transmission errors is a good option, especially in remote areas where network stability may be an issue.
Additional Questions from the Class
1. What is the difference between IoT and IIoT?
While IoT focuses on general applications (e.g., smart homes, agriculture), Industrial IoT (IIoT) emphasizes industrial and manufacturing applications, where the systems must adhere to stringent standards for reliability and security.
2. In hazardous environments, what role does IoT play in monitoring and managing assets safely, and how reliable are these systems?
IoT can monitor environmental conditions and equipment status in real-time, alerting managers to unsafe conditions instantly. With proper system design, these systems can achieve high reliability.
3. What are the potential environmental benefits of using IoT for precision farming?
IoT enables precision resource management, reducing waste and minimizing environmental impact by providing data-driven insights into irrigation, fertilizer use, and crop health.
4. How can data security and privacy be ensured in an IIoT network?
Security is critical in IIoT, where implementing encryption, secure authentication protocols, and regular system audits could be implemented to mitigate risks.
5. How can organizations ensure a successful IIoT implementation without facing cybersecurity risks?
A layered security approach, including firewalls, intrusion detection systems, and ongoing employee training to protect against cybersecurity threats.
6. Are there devices beyond sensors or GPS that can accomplish tasks within IoT or IIoT?
Actuators and drones as examples of devices that can not only sense but also act on data, allowing IoT systems to respond autonomously to changing conditions.
7. What about the durability of sensors used in IoT farming systems? Are they different in quality or sensitivity compared to similar sensors in everyday devices?
In agricultural IoT, sensors are often designed to be more rugged, with higher sensitivity and protective casings to withstand outdoor environments. These are tailored for extended use in tough conditions, unlike everyday consumer electronics.
It was both an honor and an incredible experience to host Prof. Ansgar from Helbron University. His insights into the intersection of IoT, embedded systems, and agriculture were inspiring, providing our students with a glimpse into the future of technology-driven farming. Listening to fellow educators motivates me to creating opportunities for global collaboration and learning. As someone who believes deeply in breaking down barriers in education, I look forward to inviting more professors from around the world.
Engaging with international experts not only enriches our knowledge but also motivates us to strive for higher standards in our projects and activities.
Kudos to the students who actively engaged with Prof. Ansgar and asked thoughtful questions during the session. Their curiosity and commitment to learning demonstrated the high standards they are reaching for, making this session even more impactful.
Thank you, Prof. Ansgar, for sharing your expertise and inspiring us to innovate!
This week, students from the BTE 1522 and DRE 2213 courses are given assignment that are designed to develop their programming skills in Python. Each group of three students is tasked with choosing one of the 20 game modification options available and implementing it as a team project. This assignment is all about creativity, problem-solving, and teamwork as students work to modify an existing Python game and showcase their programming concepts.
In this assignment, each group will:
Each group will submit:
To complete this assignment, please:
Upload these in KALAM (https://kalam.ump.edu.my/)
As part of the final submission, you are encouraged to be creative with their 3-minute video, which should highlight –
Good luck to all the groups, and I look forward to seeing your creativity come to life in your games!
Hybrid classes this week.
BTE1522
DRE2213
Let’s explore learning programming by troubleshooting Codes 😀 – Flags and Scoring Systems in Python
Today’s coding session was all about debugging and enhancing a game we’ve been developing step by step. We dove into Act 4, 5, 6 and 7, focusing on how to fix some key issues in the game logic—specifically how to properly handle scoring during collisions between the player and enemies.
PBL – ‘The Problem’
We already had a working player and enemy system in the game. The player can move left and right, while an enemy drops down from the top of the screen. The challenge was ensuring the player’s score only increased by one upon a collision with the enemy. Instead, the score was skyrocketing with every game frame where the player touched the enemy, adding several points instead of just one.
This type of issue is common when developing games, where collisions can occur over multiple frames. But we only want the score to increment once per collision event. To fix this, we introduced an important concept: the flag.
Introducing Flags in Python
In programming, a flag is a boolean variable (True/False) used to indicate whether a certain condition has been met. For our game, we needed a flag to signal whether a collision between the player and enemy had already occurred. This would prevent the score from increasing continuously while the player and enemy rectangles overlap.
Using a Flag to Control Scoring
Here’s how we used the flag –
collision_occurred
, which is initially set to False
. This flag keeps track of whether the collision has already happened.collision_occurred
is True
or False
.
False
and a collision happens, the score increments by 1, and the flag is set to True
. This prevents further increments until the enemy resets.True
, no further points are added, even if the player remains in contact with the enemy.False
, allowing for another score increment during the next collision.p/s Score Board is being implemented this year. One of the ways to monitor students progress in class
BTE1522
DRE2213
In Week 2 of the BTE1522 DRE2213 course, the focus was on fundamental programming concepts, specifically data types and control statements in Python. These are critical building blocks for developing logical structures within any programming language and are key to enabling students to design functional applications.
int
): Whole numbers, like 1, 2, or 100.float
): Numbers with decimal points, like 3.14 or 5.0.str
): Text data, enclosed in quotes, like “Hello, World!”.bool
): True or False values, used for conditional logic.Activity 1-3: Player Creation and Movement
Students applied their understanding of data types and control statements through practical coding exercises. In Activities 1-3, they created a basic player character and programmed its movement across the game window.
The coding exercise allowed students to implement:
Moving to the Second Phase – Five Challenges
After completing the initial activities, students moved to a more challenging phase involving code modifications and analysis. They were tasked with modifying and analyzing code to address five distinct challenges, each designed to deepen their understanding of data types and control statements.
Challenge 1: Modify Movement with Control Statements
Objective – Students were introduced to control statements such as if, elif, and else. They modified the code to allow the player to move based on specific conditions, such as different key presses resulting in different player actions.
Challenge 2: Boundary Control with Conditional Statements
Objective – In this challenge, students explored boundary detection using if and else statements. The goal was to prevent the player from moving outside the game window. This reinforced their understanding of how conditions can control flow in a program.
Challenge 3: Change Player’s Color with Data Types
Objective – Students were introduced to the concept of variables and data types such as lists and tuples. The challenge was to change the player’s color based on certain conditions, like the player reaching specific coordinates.
Challenge 4: Score and Time Tracking with Variables
Objective – Students explored the use of variables and loops to add a scoring system and time limit. They learned how to create a variable that increments when the player performs specific actions and how to manage game time using a while loop.
Challenge 5: Advanced Activity: Collision Detection
Objective – The final challenge involved practicing control structures and Boolean data types to detect when the player collided with the screen edges. This challenge required students to think critically about game dynamics and how to implement collision logic.
Pedagogical Approaches in the Exercise
To ensure a thorough understanding, two pedagogical approaches were used throughout the five challenges:
Week 2 was an essential part of the course as it introduced fundamental programming concepts like data types and control statements in Python. Through interactive activities and challenges, students not only learned to implement these concepts but also developed problem-solving skills by engaging in code modification and analysis. These exercises laid a strong foundation for the more advanced topics to come in the course.
Nurul Oct 15th
DRE2213
BTE1522