mBlock Programming 2024/8 – Pejabat Pendidikan Daerah Pekan (Arduino Edu Reka)

Today, 64 teachers from PPD Pekan had the opportunity to participate in an introductory course on physical computing program in UMPSA STEM Lab. This hands-on workshop introduced the teachers to block/graphical programming, a visual approach to coding that simplifies the process of controlling physical components such as LEDs, buzzers, and sensors.

Block or graphical programming is a method of coding where users create programs by manipulating “blocks” of code instead of writing text-based commands. These blocks represent different functions and commands and can be snapped together like puzzle pieces to form a complete program. This method is particularly useful for beginners, as it reduces the complexity of coding syntax and allows learners to focus on the logic and flow of the program.

In this program, teachers used mBlock, a visual programming tool that allowed them to write code by dragging and dropping blocks, making it easier to program the RekaEduKit components. Instead of manually typing complex lines of code, participants could simply snap together blocks that represented various actions, like turning on an LED or detecting an object with an infrared sensor.

How Block Programming Helps in Learning Physical Computing

1- Simplifies Coding Concepts

One of the major advantages of block programming is that it abstracts away the more complex aspects of traditional programming. For beginners, especially those without a strong background in coding, this makes learning much more approachable. Teachers could easily experiment with coding by dragging blocks like “turn on LED” or “detect object” into their program, without worrying about typos or complex syntax. This lowered the barrier to entry, allowing them to quickly build functional physical computing projects.

2 – Visualizes the Flow of Logic

Block programming provides a visual representation of the coding process. This is particularly useful in physical computing, where understanding the flow of inputs (from sensors) and outputs (like LEDs or buzzers) is crucial. The teachers were able to see how their program would work by following the logical sequence of blocks, making it easier to understand how data flows from the sensors and how devices react.

For example, in Activity 3: Traffic Light System, teachers used block programming to control a set of LEDs based on input from an infrared sensor. They could visually map the logic: “If the sensor detects an object, turn the green LED on; otherwise, turn the red LED on.” This clear visual representation of cause-and-effect relationships helped the teachers understand the underlying logic in physical computing systems.

3 – Encourages Experimentation and Creativity

By removing the complexities of syntax and code structure, block programming encourages learners to experiment. During the training, teachers were able to quickly modify their programs, trying out different configurations without the fear of making critical mistakes. This was evident in Activity 5: Festival of Lights, where teachers used potentiometers to control the brightness and color of Neopixel LEDs. The graphical interface allowed them to change variables and instantly see the results, fostering a deeper understanding of how inputs (potentiometer values) affect outputs (LED colors).

4. Enhances Problem-Solving Skills

Graphical programming also helps build problem-solving skills. Since block-based coding allows for quick iterations, learners can easily test and troubleshoot their code. For example, in Activity 7: Futuristic Music Instrument, participants learned to control the pitch of a buzzer using a potentiometer. When their code didn’t work as expected, they could easily adjust the blocks, get feedback from the AI, and solve the problem.

This iterative approach, paired with the visual nature of block coding, made it easier for teachers to debug their projects, fostering a deeper understanding of both coding logic and the physical computing system they were controlling.

5 – Bridges the Gap Between Software and Hardware

One of the most challenging aspects of physical computing is understanding how software interacts with hardware. Block programming provides a tangible way to bridge this gap. Teachers could see exactly how their code translated into real-world actions—whether it was an LED lighting up, a buzzer sounding, or a sensor detecting movement. The AI-assisted explanations provided additional clarity, helping participants connect the dots between the virtual coding environment and the physical components they were working with.

For example, in Activity 9: Security System, the program connected both a sound sensor and an infrared sensor to a buzzer and Neopixel LEDs. By using block coding, teachers could visually see how multiple inputs (like sound and movement detection) controlled the output (turning on a buzzer or changing LED colors). This helped them understand how software (code) could control and respond to hardware components in real-time.

The UMPSA STEM Lab program successfully empowered 64 teachers from PPD Pekan by combining the strengths of block programming and AI-assisted learning. By simplifying the coding process and providing real-time support, the program gave teachers the tools they need to confidently bring physical computing into their classrooms