Blinking LED
Original Code:
Modified Code:
The light blinks for a second and the turns off for one before repeating the cycle.
The light blinks for a very short period and then pauses.
Potentiometer
The potentiometer controls a variable that increase adn decreases as it's turned, changing the speed of which the light blinks.
Multi-Color LED
The "showSpectrum" function causes the multicolor LED to fade between its four colors, red, green, blue, and white.
LED Strip
The "oneAfterAnotherLoop" Function causes the LED's to light up in sequence one after another.
The "random LED" Function causes the LED's to light up in a random sequence.
The "marquee" function causes the LED's to light up in a sequence similar to a marquee sign/display.
Buttons
Pressing the buttons causes the LED to light up, holding down the buttons causes the LED to stay lit up until released.
Photoresistor (LDR)
Original Code
Edited/Refined Code:
In the original code, the photoresistor senses a decrease in light, the code then causes the LED to recieve more power, making it brighter as the room gets darker.
In the modified code, the LED turns completely dark in the prescence of light and fully lights up in the prescence of shade.
Temperature Sensor
LED Code
The temperature sensor detects the temperature of the room and relays that information to the computer through the Arduino board. When a temperature below 72.1 degrees is detected, the Arduino board powers the LED for one second.
Servo Motor
Modified Rotation Code
The servo motor moves the servo hrons through a series of spinning gears housed in the blue, plastic box. The code intructs the servo to rotate with several variables accounting for its speed and rotation.
Piezo Speaker
Modified Song:
The piezo speaker works by rapidly vibrating a material at different frequencies to produce different tones. The original code plays Rick Astley's "Never Gonna Give You Up", but the code I modified plays a new sequence of notes.
DC Motor
Acceleration Code
The DC Motor works by converting electrical energy into mechanical energy. The code causes the motor to accelerate from speeds 0-255. The code allows for the duration of the spin and the speeds to be changed.
Electromagnetic Relay
Relay Code:
The relay (black box), is an electromagnetic switch that work by creating a magnetic field, controling a switch the directs power to one of the two LEDs. The code fires the relay every second to light up one of the two LEDs.
Integrated Circuit Board
Marquee Pattern:
Ping Pong Pattern:
Random LED Pattern:
The Integrated Circiut is a package of transistors and other electrical components that regulate the current allowing the board to power multiple LEDs at once.
The marquee pattern works by firing the corresponding LEDs on both sides of the bread board in a descending order.
The ping pong pattern works by firing the LEDs in an order and then reversing that same order, creating a "ping pong" effect.
The random LED pattern works by creating a RNG element, randomly choosing which LED to power.