0%

Edison Goh's Coding Projects

Portrait of Edison Goh

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: Touch Activated Jack in the Box

Touch Activated 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: Touch Activated Jack in the Box
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 Line Follower Robot

Color Sensor Activated Line Follower Robot

Inspired by a line-following robot observed at the library—used to transport books from the return bin to the sorting section, I decided to design a similar robot for my home. My version is programmed to follow a black line on the floor, guiding it through areas that require cleaning. This project demonstrates how robotics can be applied to everyday tasks, using sensors to navigate and perform functions autonomously. The robot uses a color sensor to detect the line and adjust its movement accordingly, showcasing the principles of feedback control systems commonly used in robotics and automation.

Project 5: Color Sensor Activated Line Follower Robot
Project 6: Color and Touch Activated Variable Speed Merry-Go-Round
Project 6: Color and Touch Activated Variable Speed Merry-Go-Round

Color and Touch Activated Variable Speed 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.

Leap Year Checker (leap_year.py)

Description:

This program checks if a given year is a leap year by using if-else statements to handle divisibility by 4, 100, and 400. It demonstrates how to make decisions in code based on multiple conditions.

Diagram:

leap_year.png

Trinket:

Divisibility Tester (divisibility_tester.py)

Description:

I have built a Python module named **divisibility_tester.py** to check if a user-input number is divisible by both 3 and 5 using floor division and modulo.

Diagram:

Diagram for Divisibility Tester

Trinket: