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:

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:

Count Vowels and Consonants in a String (count_vowels_consonants.py)

Description:

In this project, I used a for loop to count the number of vowels and consonants in a given string. The loop iterates through each character in the string, checking if it is a vowel or consonant, and updates the counts accordingly.

Diagram:

Diagram for Count Vowels and Consonants

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:

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:

Palindrome Checker (my_palindrome_checker.py)

Description:

In this project, I used a while loop to reverse a word and check if it is a palindrome. The loop goes through every letter until the word is reversed. This is important because while loops let me repeat actions until they’re done, which is useful for checking words.

Diagram:

Diagram for Palindrome Checker

Trinket:

Fibonacci Sequence Generator (fibonacci_generator.py)

Description:

This project generates the Fibonacci sequence up to a specified number of terms. It demonstrates the use of loops and variables to calculate each term based on the sum of the two preceding numbers, a classic example in programming.

Diagram:

python_fibonacci.png

Trinket: