ASSIGNMENT
Connect 3 LEDs (red, green, and blue) and resistors to the Arduino breadboard and create a custom way to control the brightness of each LED using serial input from the keyboard.
In addition, create a unique diffuser for your light.
MATERIALS USED
3 LEDs (red, green, blue), 3 220 ohm resistors, Halloween Ghost Decoration
ARDUINO CODE
Included images of three color LEDS blinking and one single light with diffuser. Need to finish the diffuser assignment with 3 lights.
Description:
Initially, I tried making diffusers using glass, aluminum foil, toilet paper tubes, etc.
I've settled instead on using a disposable soup bowl to contain the light, the cut-off bottom of a plastic container, and cotton to diffuse the light within the bowl.
My program uses a prompt that allows users to type in their favorite type of fruit from a given list. The LEDs then light up in the color of that fruit.
Materials for diffuser:
8 oz. soup bowl
My diffuser is made of a ping pong ball, with a bit of filling to even out the light.
Code for the stepper is below: It's not 100% perfect, but it does the job ! :)
Use the r, g or b key to increase the light level with 20%