Kayson's Coding Projects

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

Project 1: Flag Tower Spinner

Flag Tower Spinner

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 flag on a tower that spins if the touch sensor is activated.

Project 1: Flag Tower Spinner
Project 2: Cuckoo Clock
Project 2: Cuckoo Clock

Cuckoo Clock

Using an ultrasonic sensor, I re-created the cuckoo clock of my ancient clock that opens and moves in and out when someone is within the range.

Project 3: Arcade Coin Dispenser

Arcade Coin Dispenser

Having played at the arcade frequently, I decided to use the concepts and design skills to create a coin dispenser that is activated to open and close only when 2 conditions are met. I could then recreate the arcade machine that dispenses coins.

Project 3: Arcade Coin Dispenser
Project 4: Emergency Stop Power Generator
Project 4: Emergency Stop Power Generator

Emergency Stop Power Generator

I went to several educational factory tours and saw human activated power generators. I decided to include a safety feature whereby the generator starts moving when the operator turns the knob and stops when it detects someone near it. This works as an emergency stop sensor.

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: Variable Speed Lazy Susan
Project 6: Variable Speed Lazy Susan

Variable Speed Lazy Susan

My family love having guests over for meals. I love spinning the lazy susan but the rate at which it moves is too fixed and too slow for my liking. I decided to recreate a lazy susan that can increase speed with the touch of a sensor. I used the coding concept of variables and conditionals. The lazy susan 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:

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:

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:

Simple Login System (login_system.py)

Description:

This project is a simple login system that checks if the entered username and password match preset values. If they do, the user is logged in; otherwise, they must try again. It demonstrates how if-else statements handle multiple outcomes based on user input.

Diagram:

login_system.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:

Library Inventory (inventory_progression.py)

Description:

In this project, I managed an imaginary library's inventory using a for loop to calculate the number of books on day 20 and the total after 20 days. This project shows how for loops make it easy to perform repetitive tasks.

Diagram:

Diagram for Library Inventory

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:

Countdown Timer (my_countdown_timer.py)

Description:

In this project, I built a countdown timer that uses a while loop to count down from a starting number until it reaches 1. This is important because it shows me how to repeat an action until a condition is met.

Diagram:

Diagram for Countdown Timer

Trinket: