BTE1522 – Week 8 – Raspberry Pi Programming

This week, we kicked off with Microcredential 2 and 3 focusing on hands-on Raspberry Pi segment

We started off with the fundamentals – configuring the Raspberry Pi environment. Students explored the process of setting up the Raspberry Pi 4, learning how to boot the system, OS installation, update packages, and enable interfaces like SSH and I2C. This step was crucial to ensure their boards were fully prepared for the upcoming hardware experiments.

MC 2 – Chapter 1 -5 Raspberry Pi Installation and Setting Up

Alongside this, we discussed key differences between Raspberry Pi 4 (a microprocessor-based platform) and Raspberry Pi Pico (a microcontroller-based platform). This opened up meaningful discussions on the architecture, applications, and performance of both systems.

MC 3 – Chapter 1 & 2: Hardware Warm-Up Activities

The class then moved into Microcredential 3, tackling Chapter 1 and Chapter 2, which introduced basic hardware control using Python and MicroPython. Over these two chapters, students completed four practical activities:

  1. Lighting up an LED (Act 1) – their very first GPIO output!

  2. LED Blinking (Act 2) – introducing timing and control loops.

  3. Reading Digital Input with Push Button (Act 3) – detecting user input via GPIO.

  4. Push Button to Control LED (Act 4) – combining input and output for basic interaction.

These warm-up activities weren’t just about turning lights on and off. They were designed to help students:

  1. Compare Python 3 (used on Pi 4) vs MicroPython (used on Pico).

  2. Understand how different hardware platforms influence programming paradigms.

  3. Build a mental model of how microprocessors and microcontrollers handle digital I/O.

Learning Through Doing

At UMPSA STEM Lab, we strongly believe in embodied learning – and this week was a great reflection of that. Students didn’t just hear about hardware or programming; they wired it, coded it, debugged it, and saw the immediate outcome of their logic and effort. It was beautiful to see LEDs blinking and eyes lighting up in sync.

Next week, we’ll continue building on this foundation by introducing OLED displays and sensor integration — more advanced interactions await!

Btw sharing with you the production of Rasp Pi in their facilities in the UK:-

BTE1522 Week 6 – Assignment – Code Modification

Today’s BTE1522 session was all about taking the class assignment slider game project to the next level—through code modification and applied programming. With their foundational game now complete (step 7), students were given a list of features to implement, each requiring a combination of Python programming concepts, critical thinking, and a bit of creativity!

In groups, students worked on implementing new functionalities into their existing slider game projects. Each modification involved one or more Python concepts and gave students the opportunity to explore real problem solving through game design.

No. Feature Programming Concepts Explored
1 Customizable Player Appearance User input, rendering, player attributes
2 Game Pause and Resume Event handling, game states, timers
4 Moving Obstacles Movement logic, collision detection, timers
5 Enemy Movement Patterns Custom functions, coordinate systems
9 Special Attacks for Player Event handling, rendering, custom functions
10 Multiplayer Mode Input handling, game states
14 Leaderboard Display File handling, string formatting, data persistence
17 Player Lives System Conditionals, variables, state management
18 Health Bar Display Rendering, variables, collision
20 Level System Level management, difficulty scaling

Each team selected a feature, explored the Python logic behind it, and began integrating it into their existing codebase. It was rewarding to see teams applying what they’ve learned about loops, conditionals, functions, and event handling in a hands-on way.

To push their understanding further, every group was given a “Level-Up” challenge—a task that required enhancing or optimizing their chosen modification. These challenges were designed to:

      1. Encourage deeper reflection on Python logic

      2. Promote code efficiency and modular design

      3. Help students explain the relationship between what their game does and the Python concept it’s based on

For example:

      1. Teams working on player lives were challenged to add a visual life tracker (hearts or icons).

      2. Those creating a multiplayer mode were asked to explore keyboard conflict resolution and responsive game states.

      3. The group managing the leaderboard was tasked to sort and persist scores across sessions.

Throughout the activity, students were encouraged to ask themselves:

    1. “What Python concept is being used here?”

    2. “How can I break down this functionality into smaller functions?”

    3. “How can I make this scalable if I wanted to add more features?”

    4. “Why code in such way?

This reflection not only reinforces their coding skills but also helps students become intentional learners, capable of connecting code to concept.

To all the students, please submit your work via Tinta. make sure to include:-

      1. Python codes .py
      2. Readme.txt file to explain the code functionalities
      3. Project documentation in .doc format (please include the YT link of youe project) – due date April 25th.

 

BTE1522 – Week 5 – Code Troubleshooting

This week in BTE1522, we focused on troubleshooting the Slider Game code as part of our hands-on approach to learning Python programming. Over the past four weeks, students had completed Steps 1 through 7 of the game development process — from designing a simple game window to implementing the “Game Over” condition.

In Week 5, we shifted our focus from building to refining.

Troubleshooting Score Logic
The session began with a debugging challenge: fixing the issue where the score kept increasing continuously whenever the player collided with the enemy. The expected behavior was that the score should increase by only 1 per collision. This led to an exploration of Boolean flags (such as collosion = False) and control logic — helping students understand how to track and limit events in game logic using conditional statements.

Implementing Countdown Timer
Next, students were challenged to modify the game’s default up-counting timer into a countdown timer. This exercise required them to revisit Python functions and logic structures. They learned how to set and decrease a timer, as well as how to trigger the “Game Over” condition when time reaches zero.

Debugging as a Learning Tool
Troubleshooting is a vital part of programming, and through this session, students experienced how debugging helps deepen understanding of syntax, logic flow, and structure in Python. Debugging isn’t just about fixing errors — it’s about making your code smarter and your logic stronger.

This week’s activity reinforced the idea that learning to program by building and breaking things — then fixing them — is one of the most effective ways to understand a programming language. Students left the class not just with working code, but with improved problem-solving skills and a stronger foundation in Python.

Python for Image Processing 2025/1 – BHE 2025

Today, I had the opportunity to deliver a workshop on Introduction to Python, specifically targeting its application in image processing. This workshop was part of a preparatory class for UMPSA double-degree students, who will be enrolling in their image processing course next semester. The objective was to provide them with a foundation in Python programming through a hands-on project-based approach.

Instead of a conventional lecture-style introduction to Python, the workshop focused on a project-based learning approach, where students were introduced to programming concepts by developing a Slider Game. This project served as an engaging platform to explore Python syntax and core programming concepts, including:

      1. Pixels and Color Schemes – Understanding how colors and pixels form the basis of image processing.
      2. Object-Oriented Programming (OOP) – Declaring objects, defining classes, and implementing methods.
      3. Control Statements – Implementing loops (for, while) and conditional statements (if-else).
      4. Event Handling – Managing user input and interactions within the game.
      5. Timers – Implementing countdowns and delays for interactive experiences.

This step-by-step approach helped students grasp the syntax and structure of Python while simultaneously building a fun, interactive game.

Following the Python fundamentals and project development, the workshop transitioned into setting up Anaconda, a critical tool for managing Python environments and dependencies efficiently. Special attention was given to embedding the .yml environment file prepared by the image processing course coordinator. This ensured that students had access to all key libraries and tools required for their upcoming course, including:

      1. scikit-image – For advanced image processing tasks.
      2. Matplotlib – For data visualization and plotting image transformations.
      3. OpenCV – For real-time image manipulation and computer vision applications.

By setting up a pre-configured environment, we aimed to provide students with a smooth learning experience without the hassle of installing dependencies manually.

The workshop concluded with a hands-on session exploring fundamental image processing techniques. Students experimented with:

      1. Image Scaling – Resizing and adjusting image dimensions.
      2. Color Manipulation – Converting RGB images to grayscale.
      3. Basic Filters & Enhancements – Adjusting brightness, contrast, and sharpening.

As a final exercise, students worked with the iconic Lenna.png file, applying different transformations to understand basic image properties.

This workshop was an exciting and fulfilling experience, as it introduced students to Python programming in a practical and engaging manner. By developing a project along the way, they not only learned Python syntax and concepts but also experienced how these concepts translate into real-world applications like image processing. I truly enjoyed guiding them through this process and hope they found this approach refreshing and insightful.

Wishing all the students the best of luck in their upcoming image processing course! Looking forward to seeing how they apply Python in their projects and beyond.

BTE1522 DRE2213 – Week 8 – Assignment Presentation

  1. Pause ane Resume
  2. Restart and Quit
  3. Initialization
  4. Multiplayer
  5. MultiEnemy
1 CLICK HERE 

CLICK HERE

 RAJA RE23313, SKANTHANESSH RE23028, ARIF DANIEL RE22197 https://youtu.be/wdr8H9__MGU LEE TG23095

ALIYA TG23102

Belal TG23126

6   CLICK HERE  SYAHMI TB24018, 

SHAFIQ TB24026

SYAFIQ TB24031

7 https://youtu.be/Fex0y6rYwsk  HABEEB RE23111, SYIDI RE23077

JIHAN RE23223

https://youtu.be/zobtlQxvhlk  HAKIMI TG23107

ANISH TG23127

HAZIQ TG23117

9 https://youtu.be/OhULOoHPlEM?si=9Gwsce8ryL9sYDIz   FONG RE23057, CHOO  RE23297

Zunaizah RE23248

https://youtu.be/g4y_-jlHNr4  ADIB TB2023

HAZIM TG24012

NUR SYAFIQ TB24007

10 https://www.youtube.com/watch?v=SF0_KpB2HUk LAW RE23293, GABRIEL RE23074

FARIDRE23324

https://youtu.be/e_xzHZlKjpY  MAIRA TG24026

ELLIANA TB24015 

11 click here IZZAT RE23157. 4, AIZAD RE23147

LUTFY RE23161

https://youtu.be/9loZbNFo8-g?feature=shared TANIA (TB24029)

NITHYAA(TB24027)

12  https://youtu.be/0qKAwQwh8NE FADE (TB24024)

ALIF (TB24030)

14   https://youtu.be/mtovpGBYEpk?si=sDmPPAo0LGhzKnQ2    DYRAND TG23112

 ADAM TG23086

 ALISA TG23111

15 https://youtu.be/8ZNOtMVddeQ  FATTAH RE23218, HAIKAL RE23208

FAHIM RE23267

https://youtu.be/V4jSDcJGpcA   Daniel Aufa TB24043

Danish Haikal TG24006

17 https://youtu.be/YuhGqjvRMwY?si=Jy1aS9OD78UHzybd DANIEAL RE23281, MAHI RE23174, IZDIHAR RE23292 https://youtu.be/YHngQFqPuDI   RAZIQ TG24007
SYAHEY TG24011TINESH TG244013
18  https://youtu.be/dh4DtpmEnCQ  IQBAL RE23150, HAKIM RE23211, BUKHARI RE22109 https://youtu.be/7oTHYKsIeCI  CAIROL (TB24012)

FRANCES (TB24014)

KANA (TB24017)

19 https://youtu.be/ql6ugbFjPyU HAZIQ RE23120

AIMAN RE23163

ARIF RE23320

https://youtu.be/mbikg-wHGgA?si=oputKtcMW-UzHVmQ MUHD IMRAN HAKIM TG24020

KAZRI  TG24005

AHMAD ATIQ TG24009

20   ALIF TB24011

HAIKAL TB24019

BTE1522 DRE2213 – Week 15 – Project Presentation

Well done everyone!

BTE1522

  1. Environmental Monitoring Station
  2. Attendance System-with Facial Recognition System
  3. Real-time Video Streaming
  4. Realtime Data-Logger
  5. Real-Time Data Logger
  6. Motion Detector
  7. Realtime Distance Monitoring
  8. Navigation with GPS
  9. Automation Starter
  10. Distant Meter
  11. Motion Tracker
  12. Obstacle Detection
  13. GPS Tracker

DRE2213

  1. Object Detection
  2. Temperature Detector
  3. Weather Dashboard
  4. Smart Surveillance System

  5. Weather Companion
  6. Image & Acccelerator Dashboard
  7.  Weather Station
  8. Fitness Tracker
  9. Image Tracker
  10. Motion Gesture Sensor