0%

Elijah Phoon's Coding Projects

Portrait of Elijah Phoon

Project 1: Touch Activated Bumper Car

Touch Activated 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: Touch Activated Bumper Car
Project 2: Color Sensor Sushi Conveyor Belt System
Project 2: Color Sensor Sushi Conveyor Belt System

Color Sensor Sushi Conveyor Belt System

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: Ultrasonic Activated Coin Dispenser

Ultrasonic Activated 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: Ultrasonic Activated Coin Dispenser
Project 4: Touch and Ultrasonic Activated Car
Project 4: Touch and Ultrasonic Activated Car

Touch and Ultrasonic Activated 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 pressed. While in motion, the car continuously checks for obstacles using the infrared 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. This entire process repeats endlessly, creating a looped simulation of real-world automated vehicle behavior.

Project 5: Color Sensor Activated Tea Cup Ride

Color Sensor 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: Color Sensor Activated Tea Cup Ride
Project 6: Touch Activated Increasing & Decreasing Treadmill
Project 6: Touch Activated Increasing & Decreasing Treadmill

Touch Activated Increasing & Decreasing Treadmill

As someone who enjoys exercising on a treadmill, I decided to recreate an automated treadmill using LEGO Technic parts. This miniature version functions similarly to a real treadmill—its speed is controlled by user input. With the use of a touch sensor, and coding concepts such as variables and if-else statements, the treadmill increases speed with each press—just like speed adjustments on a real gym machine.

Currency Breakdown (currency_breakdown.py)

Description:

In this project, I learned to use division and remainders to split a dollar into different bills. I figured out how many twenties, tens, fives, and ones make up the total. This is important because it shows how math helps us handle money and make change easily.

Diagram:

Diagram for Currency Breakdown

Trinket:

Time Breakdown (time_breakdown.py)

Description:

In this project, I used math to change a huge number of minutes into days, hours, and minutes. I used division and remainders to see how many full days there were and what was left over. This is important because it shows how math can help us understand time by breaking it down into parts we can read.

Diagram:

Diagram for Time Breakdown

Trinket:

Who Is Older?

Description:

This project compares the ages of two users and determines who is older. It utilizes basic input/output operations and conditional statements to implement the age comparison logic. The program guides the user through a series of prompts that systematically gather the necessary information, such as names and ages, to perform the comparison. The result is a simple yet effective demonstration of how programming can be used to solve everyday problems.

Diagram:

Diagram for Who Is Older?

Trinket:

Price Difference Calculator (price_difference.py)

Description:

This project calculates the price difference between two products. It demonstrates the use of variables and basic arithmetic operations to find the difference in price, a common task in programming. The program prompts the user to input the prices of two products and then calculates and displays the difference. This project is a practical example of how programming can be used to solve everyday problems related to budgeting and financial decisions.

Diagram:

python_pricedifference.png

Trinket:

Shopping Cart (shopping_cart.py)

Description:

This project simulates a basic shopping cart experience, allowing users to add items, view their cart, and calculate the total. It demonstrates the use of data structures (like dictionaries or lists) to manage inventory and user selections, along with fundamental arithmetic operations.

Diagram:

Diagram for Shopping Cart

Trinket:

Initials Generator (initials_generator.py)

Description:

This project extracts the initials from a given full name, showcasing string splitting, iteration, and character manipulation. It's a practical example of processing user input to extract specific information.

Diagram:

Diagram for Initials Generator

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:

Rolling Dice (rolling_dice.py)

Description:

This project simulates the rolling of dice using random number generation. It demonstrates the use of loops and conditionals to create a simple game where users can roll dice and see the results. The program provides a fun way to explore concepts like randomness and probability in programming.

Diagram:

Diagram for Rolling Dice

Trinket: