Erin Lim's Coding Projects

My name is Erin and I am 12 years old this year. I started learning robotics with the Lego Mindstorms together with block-based coding when I was in Primary 4. I enjoy working on different structures and robots, designing and building them to automate routine daily tasks in my life. Learning robotics helped me to solve real world problems. I was eager to explore beyond block-based coding. This spark my interest in learning python, text-based coding. I wanted to write codes to help me solve my math problem sums without the use of the pen and paper. Beyond honing my python fundamentals, I wanted to create games that was beneficial to students. I leant how to use Pygame and created different games that my friends could compete and challenge one another. I have documented my journey in robotics, coding, Innovation and STEM.

Portrait of Erin Lim

Project 1: Bumper Car

Bumper Car

I learned how to use LEGO Technic parts to design and build functional mechanical systems. By applying coding concepts such as conditionals (if-else) and integrating various sensors, I programmed my creations to respond dynamically to their environment. One example was a bumper car that automatically reverses when its front touch sensor detects a collision—mimicking real-world applications of obstacle detection used in autonomous vehicles and robotic systems to enhance safety and navigation.

Project 1: Bumper Car
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: Motor Controlled Jack In The Box

Motor Controlled Jack In The Box

Wanting to create a fun toy to prank my siblings, I applied the design principles and coding skills I learned to build a build a Jack-in-the-Box mechanism. It’s controlled by a handheld motor that activates the opening and closing of the box. By spinning the motor in a specific sequence of directions, the Jack springs out, demonstrating how programmed mechanical sequences can create interactive and entertaining devices—similar to automated toys and novelty mechanisms used in entertainment and consumer products.

Project 3: Motor Controlled Jack In The Box
Project 4: Ultrasonic Activated Automated Car
Project 4: Ultrasonic Activated Automated Car

Ultrasonic Activated Automated Car

I decided to create an automated car using LEGO Technic parts that can return to its original parking position after detecting an obstacle. This project simulates the logic behind autonomous parking systems found in modern vehicles. Using the concept of nested while loops with variables, I programmed the car to activate and begin moving when the touch sensor is activated. While in motion, the car continuously checks for obstacles using the ultrasonic sensor. Once an obstacle is detected, the car automatically stops and reverses back to its starting point—mimicking a vehicle returning to its parking spot.

Project 5: 2 Colour Activated Tea Cup Ride

2 Colour Activated Tea Cup Ride

As someone who enjoys visiting amusement parks—especially the tea cup ride, I recreated a classic amusement park teacup ride using LEGO Technic parts. It incorporates two color sensors to make decisions about when and how to spin, based on both the color detected and the amount of reflected light. This adds a layer of safety and control that reflects how real-world rides use environment-sensitive automation.

Project 5: 2 Colour Activated Tea Cup Ride
Project 6: Touch And Colour Activated Merry Go Round
Project 6: Touch And Colour Activated Merry Go Round

Touch And Colour 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 experience. Using core programming concepts such as variables and if-else logic, I programmed the system to decrease the ride’s speed when the color sensor detects a specific value and to increase the speed when the touch sensor is activated. This combination of hardware and software control allows for smooth, adaptive motion that mirrors the operation of real amusement rides.

Simple Division (simple_division.py)

Description:

This project shows how to calculate the remainder when one number is divided by another. It’s a great way to practice using arithmetic and the modulo operator (%).

Diagram:

simple_division.png

Trinket:

Even/Odd Checker (even_odd_checker.py)

Description:

In this project, I designed a program that checks if a number is even or odd using if-else statements. This project teaches me how to make decisions in code based on conditions.

Diagram:

Diagram for Even/Odd Checker

Trinket:

Prime Number Guesser Game (prime_number_game.py)

Description:

This game challenges you to decide if a number is prime by using if-else statements. It’s a fun way to reinforce the concept of prime numbers and divisibility in code.

Diagram:

prime_number_game.png

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:

Word Matrix Diagonal (word_matrix.py)

Description:

In this project, I learned how to create a program that takes in a user input for a choice of word and prints the word diagonally in a square matrix using a nested for loop concept.

Diagram:

Diagram for Word Matrix

Trinket:

Pascal Triangle (pascal_triangle.py)

Description:

In this project, I created a program that uses nested loops concept to build a classic math triangle known where each number is the sum of the two numbers above it.

Diagram:

Diagram for Pascal Triangle

Trinket:

Sum of My Even Numbers (sum_of_my_even_numbers.py)

Description:

I have created a Python script named sum_of_my_even_numbers.py. It prompts me for a positive integer, and using a while loop, it calculates and displays the sum of all even numbers from 2 to the entered integer.

Diagram:

Diagram for sum of even numbers

Trinket:

Countdown Timer (my_countdown_timer.py)

Description:

In this project, I built a countdown timer that uses a while loop to count down from a starting number until it reaches 1. This is important because it shows me how to repeat an action until a condition is met.

Diagram:

Diagram for Countdown Timer

Trinket: