0%

Wallace Loh's Coding Projects

Hi My name is Wallace, and I’m 12 years old. I began learning robotics with Lego Mindstorms and block-based coding in Primary 3, which sparked my interest in designing robots to automate daily tasks. Robotics taught me to think logically and creatively to solve real-world problems, inspiring me to move beyond blocks and learn Python.

Portrait of Wallace Loh

Project 1: Ping Pong Racket

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: Ping Pong Racket
Project 2:Colour activated sushi belt
Project 2:Colour activated sushi belt

Colour activated sushi belt

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 sushi conveyor belt system that automatically stops when a specific color is detected. This mimics the function of an emergency stop button, commonly found in industrial automation and manufacturing environments, where color or visual sensors are used to trigger safety protocols or halt operations in response to potential hazards

Project 3: Color Activated Shooter

Color Activated Shooter

Having played at the arcade frequently, I decided to use the concepts of conditional statements, colour detection and output controls to create a secure and precise shooter that fires a shot when the colour sensor detects 2 specific colours in the coded order. This project demonstrates how sensor integration and conditional logic can be used to develop automated systems, with potential applications in intelligent defense technologies.

Project 3: Color Activated Shooter
Project 4: Ultrasonic automated toy rabbit head
Project 4: Ultrasonic automated toy rabbit head

Ultrasonic automated toy 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.

Project 5: Touch and ultrasonic activated lazy susan

Touch and ultrasonic activated lazy susan

My family loves having dinners together, so I decided to recreate an automatic one with lego parts. I built a touch-activated Lazy Susan to make sharing food more fun and convenient. When the touch sensor is pressed, the Lazy Susan begins to spin. The direction of the spin—clockwise or counterclockwise—is determined by the reading from an ultrasonic sensor. Depending on how close our hand is to the sensor, the turntable will rotate in one direction or the other.

Project 5: Touch and ultrasonic  activated lazy susan
Project 6: Colour and touch speed activated merry go round
Project 6: Colour and touch speed activated merry go round

Colour and touch speed activated merry go round

My younger brother enjoys riding a merry-go-round, so I decided to build an automated LEGO Technic version for his imaginary friend. The ride’s speed is controlled using both a touch sensor and a color sensor, creating an interactive and responsive amusement ride experience. The project uses key programming concepts such as variables and if-else logic to adjust the motor speed based on sensor inputs. Using the coding concepts of variables and if else statements, I programmed the merry go round to decrease speed when the colour sensor detects a specific value and to increase speed when the touch sensor is activated.

Weight Units Converter (weight_units_converter.py)

Description:

In this project, I learned how to convert weight from pounds to kilograms by multiplying by a conversion factor. This is important because it teaches us how to change one unit of measurement to another so we can compare different types of data.

Diagram:

Diagram for Weight Units Converter

Trinket:

Armstrong Checker (armstrong_checker.py)

Description:

I have implemented a Python script named armstrong_no_checker to check if a given number is an Armstrong number. An Armstrong number for a 3-digit number is a number that is equals to the sum of the cubes of its digits. For example, 153 is an Armstrong number because 1^3 + 5^3 + 3^3 = 153. This project demonstrates the use of functions, loops, and conditionals in Python to solve mathematical problems. The script prompts the user to enter a number and checks if it is an Armstrong number by calculating the sum of the cubes of its digits and comparing it to the original number.

Diagram:

Diagram for Armstrong Checker

Trinket:

Simple Login System (login_system.py)

Description:

This project is a simple login system that checks if the entered username and password match preset values. If they do, the user is logged in; otherwise, they must try again. It demonstrates how if-else statements handle multiple outcomes based on user input.

Diagram:

login_system.png

Trinket:

Right Triangle Checker (right_triangle_checker.py)

Description:

In this project, I used if-else statements to check if a triangle is right-angled. I asked for three sides, sorted them, and used the Pythagorean theorem to decide if the triangle was right. This is important because if-else lets the program choose different actions based on the input.

Diagram:

Diagram for Right Triangle Checker

Trinket:

Number Pyramid (number_pyramid.py)

Description:

In this project, I created a number pyramid using nested for loops. The outer loop controls the number of rows, while the inner loop prints the numbers in each row. This project demonstrates how to use loops to create patterns and shapes in Python.

Diagram:

Diagram for Number Pyramid

Trinket:

Library Inventory (inventory_progression.py)

Description:

In this project, I managed an imaginary library's inventory using a for loop to calculate the number of books on day 20 and the total after 20 days. This project shows how for loops make it easy to perform repetitive tasks.

Diagram:

Diagram for Library Inventory

Trinket:

Factorial Calculation(factorial_calculator.py)

Description:

I organized a math competition among my friends, and one of the challenges involved calculating the factorial of a given number. I created a Python script that took a user input and calculated the factorial of the given number.

Diagram:

Diagram for Factorial Calculation

Trinket:

Number Guessing Game (my_number_guessing_game.py)

Description:

In this project, I built a guessing game using a while loop that keeps asking for a guess until the answer is right. The game tells me if my guess is too high or too low. This is important because while loops let me repeat actions until a condition is met, which is perfect for games.

Diagram:

Diagram for Number Guessing Game

Trinket:

Drone Cert 2025

Description:

These certificates were awarded in recognition for Wallace’s successful completion of the 2 day drone program by MIRS Innovate and TheLogicCoders

Coding Olympics 2025 Certificate