Beh Ming Heng's Coding Projects

My name is Min Heng, and I am 12 years old. I started learning robotics with LEGO Mindstorms and block-based coding in Primary 4. I enjoy designing and building robots and structures that automate simple tasks in my daily life. Learning robotics showed me how technology can solve real-world problems and inspired me to go beyond block-based coding. This sparked my interest in Python, where I began writing programs to help me solve math problems more efficiently. As I strengthened my Python skills, I also started creating educational games using Pygame—games that my friends could play, compete in, and learn from. I have documented my journey in robotics, coding, innovation, and STEM.

Portrait of Beh Ming Heng

Project 1: Touch Activated Ping Pong Racket

Touch Activated Ping Pong Racket

I learnt how to use the LEGO technic parts to create different designs. Using the coding concept of conditionals (if-else), together with different sensors, I coded my designs to do certain actions only if a specific condition is met. Among many other projects, I created a ping pong racket that hits the ball if the touch sensor is activated.

Project 1: Touch Activated Ping Pong Racket
Project 2: Rack and Pinion Door
Project 2: Rack and Pinion Door

Rack and Pinion Door

I learned how to use LEGO Technic parts to design and build various mechanical structures. By applying coding concepts such as conditionals (if-else) and incorporating different sensors, I built a rack and pinion door. Using an ultrasonic sensor, I recreated an automatic sliding door like those commonly found in shopping centers. The door opens when a person is detected within a certain range, demonstrating how sensor technology is used in real life to improve accessibility, convenience, and energy efficiency in public buildings

Project 3: Distance sensor Coin dispenser

Distance sensor Coin dispenser

Inspired by arcade coin dispensers, I applied the design principles and coding skills I learned to build a distance-activated coin dispenser. The dispenser uses two ultrasonic sensors that detect my hand in a specific sequence within a defined distance threshold. When both sensors are triggered in order, the mechanism opens to release coins. This project demonstrates how sensor integration and conditional logic can create automated systems, similar to those used in vending machines .

Project 3: Distance sensor Coin dispenser
Project 4: Touch Activated Automated Rabbit Head
Project 4: Touch Activated Automated Rabbit Head

Touch Activated Automated Rabbit Head

My younger siblings loved playing with their toy rabbit head, which spins when the wind hits it. They used to manually spin and stop it, which was fun but limited. To make it more interactive and engaging, I decided to create an automated version of the toy. In this upgraded version, the rabbit head starts spinning automatically as soon as the program runs. When the ultrasonic sensor detects someone nearby—such as a child approaching—the spinning stops, and the toy returns to its original position.

Pygame Project: SpeedMath (speed_math.py)

Description:

In this exciting project called "SpeedMath", I used Pygame to create a fast-paced math quiz game. The game shows a math equation on the screen and challenges you to decide whether the equation is True or False before time runs out. I designed the game using object-oriented programming (OOP), which means I organized the code into classes for the game screen, the scoreboard, and even the instructions—just like putting together a cool LEGO set!

The best part is that the game tests your quick math skills. For example, an equation like "3 + 5 = 8" will appear, and you have to press Y if you think it’s correct or N if you believe it’s wrong. I used loops and if-else statements to make sure the game runs smoothly and to update the score automatically.

I also added a timer so that every second counts—this makes the game both challenging and fun. Creating SpeedMath taught me not only how to code but also how to think fast and solve problems under pressure. It was a fantastic way to mix creativity with logic, and I felt like a real game developer when I saw my ideas come to life on the screen!

As a young Singaporean, I love learning new things and exploring how technology works. SpeedMath is my way of making math exciting and showing that even hard subjects can be turned into fun games.

Diagram:

WhatAnimal Project Diagram

Trinket: