Hi, I am Josh Ng, 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!
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 the many projects I have made, one of my favourites is a bumper car that reverses when the touch sensor in the front hits the wall.
Using motor as a sensor, I created an escalator that moves when the motor reading is less than 0 and stops if the reading is more than 0. This is similar to an emergency-controlled lever.
I wanted to create an automatic geared car similar to one on the racetracks. I decided to use the coding concepts of while loops and design skills to create a car that moves only when the touch sensor is activated. It will stop immediately when the ultrasonic sensor detects someone in front and this distance with a specific threshold is determined by me.
I love going to the amusement park and taking the spinning top ride whose speed is usually human operated. I decided to recreate the ride using LEGO technic parts and coded it to move when it is activated by colour sensor 1. I could control the direction it spins using colour sensor 2 by determining the values.
The chandelier in my house is stationary and works only as a light source. I decided to create one that could also move. Using the concepts of nested while loops and the and function, the chandelier will spin when the motor reading of the motor is less than zero. It will stop when 2 conditions are met. When ultrasonic sensor detects someone and colour sensor detects blue, the chandelier will stop. This acts like an emergency stop function. It is then activated to move again with the motor lever.
I love to see windmills whenever I go overseas. I wanted to create a windmill whose speed could be controlled using the touch and colour sensor. With the coding concepts of variables and if else, the blades of the windmill increase speed if the colour sensor detects a value and decreases speed if the touch sensor is activated.
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.
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.
I designed a simple movie theatre ticketing system that uses if-else statements to determine the ticket price based on the age of the customer. If the customer is under 18, they get the child ticket price, else they get the adult ticket price.
I designed a weather application. I developed a Python program that takes in the user's input for the current temperature in Celsius and classifies it into different categories: "Freezing," "Cold," "Moderate," and "Hot."
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.
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.