Project 10
5/3/2020 Project 10
https://murraystate.instructure.com/courses/1359835/assignments/5892388?module_item_id=13755093 1/1
Objective: Use an analogRead function to input a signal from a photoresistor, and digitalWrite function to create different colors from a RGB LED.
Project: As the photoresistor detects increasing light levels (according to the table below) the RGB LED will change colors. The RGB (Red Green Blue) LED is actually 3 different colored LEDs packaged into a single body. By lighting different combinations of the three colored LEDs, different colors can be created. The table below shows what LED color combinations will create, as well as the desired photoresistor readings:
Photoresistor value RGB LED Color Red LED Blue LED Green LED
920+ White HIGH HIGH HIGH
901-920 Yellow HIGH LOW HIGH
851-900 Red HIGH LOW LOW
801-850 Purple HIGH HIGH LOW
751-800 Blue LOW HIGH LOW
601-750 Teal LOW HIGH HIGH
451-600 Green LOW LOW HIGH
0-450 Off LOW LOW LOW