Make a light that changes colour

Hi there this is the first time I’m using the forum and I’ve just started using or learning Arduino a few weeks back and were given a task to do but really confused.
equipment given miccontroller , 10 k resistor, RGB SMD version and light sensor a photoresistor

the task is: the lightbulb should have a cold blueish color during the day and during the night it will switch to a warmer color like red or orangish type of color.
can anyone help please!

Have you managed to do any of this, like detect light and dark, or light the LED?

If so, post what you’ve got.
In code tags.

To augment what AWOL said, I would suggest getting one thing to work at a time. Make sure you control the LED properly then make sure you can read the light sensor. Only after getting those separate functions working then combine them.

Hello,
Even before you try to use the Arduino, connect your photo resistor in series with a resistor to a small power supply or even a battery. Measure with a multimeter the voltage over the resistor and put some light and dark on the photoresistor. This way you can feel how it behaves. (10K could be ok)
Look the datasheet up for the photoresistor you have, ohms law can help you to determine the size of the resistor. Whatever you do make sure you do not go over the maximum current in the photoresistor.
Once you have this, you can scale the resistor and connect to an analog input of your Arduino.
The rest you will figure out along the road you go.
Best Regards,
Johi.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.