Nathaniel Tan's Coding Projects

Hi, I am Nathaniel Tan, 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 Nathaniel Tan

Project 1: Ping Pong Racket

Ping Pong Racket

I learnt how to use the LEGO technic parts to create different designs. Using the coding concept of conditionals (if-else), together with different sensors, I coded my designs to do certain actions only if a specific condition is met. Among many other projects, I created a ping pong racket that hits the ball if the touch sensor is activated.

Project 1: Ping Pong Racket
Project 2: Automated Shopping Center Door
Project 2: Automated Shopping Center Door

Automated Shopping Center Door

Using an ultrasonic sensor, I re-created the door of the shopping center that opens automatically when a person is standing within the range.

Project 3: Arcade Gripper

Arcade Gripper

Having played at the arcade frequently, I decided to use the concepts and design skills to create a gripper that is activated to open and close only when touch sensor is activated. I could then recreate the arcade game of picking up and releasing anything at home.

Project 3: Arcade Gripper
Project 4: Spinning Rabbit Head
Project 4: Spinning Rabbit Head

Spinning Rabbit Head

My younger siblings loved playing with their toy rabbit head that spins when the wind hits it. They had to spin and stop them manually. I decided to create an automated toy that starts moving when the program starts. It will stop when touch sensor is activated and return to the original position.

Project 5: Sensor-Controlled Spinning Top

Sensor-Controlled Spinning Top

Playing the top is my childhood game and I decided to recreate a sensor-controlled spinning top using LEGO technic parts and coded it to move when it is activated by a colour sensor. I could control the direction it spins using an ultrasonic sensor when it detects someone within different range. If the ultrasonic sensor detects someone near it, it will spin clockwise, else, it spins anti-clockwise.

Project 5: Sensor-Controlled Spinning Top
Project 6: Airplane Propeller Ride
Project 6: Airplane Propeller Ride

Airplane Propeller Ride

I love taking the planes and watching the propellers spin and increasing speed as the power turns up. To recreate that, I used the coding concept of variables and conditionals. The ride will start moving slowly and increase in speed each time I press the touch sensor.

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:

Calculator Factory Production Tracker (factory_tracker.py)

Description:

In this project, I tracked the production rate of a calculator factory that follows an arithmetic progression. I calculated the number of calculators produced on day 30 and the total after 30 days. This shows how loops can handle repeated calculations for real-world scenarios.

Diagram:

factory_tracker.png

Trinket: