Random LED Switch — Arduino Logic Experiment
A small Arduino learning experiment that used a button press, random number generation, and switch-case logic to turn different LEDs on.
Overview
Random LED Switch was an early Arduino logic experiment from 2021 focused on button input, random selection, and LED output behavior. The project used a button press to trigger a random number, then used switch-case logic to choose which LED pattern should turn on. This was a small but useful learning project because it connected physical input with program logic and visible hardware output. This project is useful as a small code-backed early learning prototype. It shows the foundation of later automation work: reading a physical input, making a programmatic decision, and controlling hardware output.
Problem solved
The project was mainly a learning experiment. It explored how Arduino could read a physical button, process the input, generate a random choice, and convert that decision into visible LED behavior.
What it does
When the button input changes, the code generates a random number between different cases. Depending on the selected case, it turns on all LEDs or one specific LED such as red, blue, or green. The project also prints the random number and LED state messages through serial output.
Contribution
Parth wrote the Arduino logic for button reading, random case selection, serial output, and LED control. The project helped practice basic electronics control, conditional logic, and switch-case programming.