ECE 1100 Discovery Project

November 27th, 2023

Overview:

For my ECE 1100 Individual Discovery Project at Georgia Tech, I embarked on a hands-on exploratory endeavor within the realm of Electrical and Computer Engineering. Titled “Randomly Alternating Flashing Lights,” the project aimed to provide an introductory experience in ECE, allowing me to assess and confirm my interest in this field. With the guidance of the Georgia Tech RoboJackets, I soldered together a circuit board housing embedded LED lights linked to digital pins. Utilizing the Arduino IDE, I programmed these LEDs to flash in a random pattern, incorporating a variably timed delay between flashes.

This project served as a pivotal platform for honing essential skills in creating embedded systems and seamlessly integrating them with code. By achieving proficiency in assembling basic Arduino switchboards and coding in the Arduino variant of C++, I laid a foundation for practical ECE learning. My overarching goal with this project was not to just create a flashing light display, but to begin my journey in understanding the bridge between the hardware and software of machines.

My Code:

To code the Arduino program for the “Randomly Alternating Flashing Lights” project, I used the following approach:

  • Define Pin Mapping:
    • Defined a mapping for the digital pins D1 to D5, allowing for easy modification in the future without extensive code changes.
  • Create Arrays:
    • Created a pinArray with 5 pins, establishing the foundation for random iteration.
    • Created a timeArray with 5 time values, enabling random time interval selection.
  • Setup Function:
    • Utilized the setup() function to initialize the Arduino project.
    • Set up digital pins D1 to D5 as output pins using pinMode.
    • Initialized all LEDs to the off state at the project’s start.
  • Loop Function:
    • Implemented the loop() function for continuous program execution.
    • Utilized the random() function to select a random number from 0 to 5.
    • Assigned a pin at the random index in the pinArray to switch on.
    • Programmed a delay, corresponding to one of the 5 elements in the timeArray, chosen randomly.
    • Repeated the process for turning off a specific LED and maintaining a random delay.

This methodological synthesis of the code ensures the assignment of one random LED and one random time delay at a time, eliminating the need for continuous tracking of LED states and streamlining the overall program structure.

A Visualization

Project Results

The displayed video showcase the random flashing of lights with variable time delays. In future experiments, I plan to replicate this using an Arduino OLED display, introducing random colors on the LED-powered screen with varying time intervals between each display.