Teh Yi Feng's Coding Projects

Hi, I am Teh Yi Feng, and I love exploring robotics and block‑based coding. I enjoy solving problems by building creative projects that mix hardware and code. My projects range from designing robots using LEGO Technic parts to programming sensors with block‑based code!

Portrait of Teh Yi Feng

Project 1: Touch Sensor Table Tennis Racket

Touch Sensor Table Tennis Racket

I wanted to create a table tennis racket that could be activated by touch sensor. Using the coding concepts of conditionals (if else statements), I created a racket that would swing and hit a ping pong ball when the touch sensor is pressed.

Project 1: Touch Sensor Table Tennis Racket
Project 2: Ultrasonic Sensor Activated Door
Project 2: Ultrasonic Sensor Activated Door

Ultrasonic Sensor Activated Door

Using an ultrasonic sensor, I re-created the door of a shopping center that opens automatically whenever a person is within a specific distance from the door.

Project 3: Color Activated Shooter

Color Activated Shooter

Having played at the arcade frequently, I decided to create a secure and precise shooter that fires a shot whenever the two colour sensors detect 2 specific colours in a coded order using the coding concept of conditional loops.

Project 3: Color Activated Shooter

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:

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:

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: