Self bright adjusting lamp


Hi, here I share the code of an autonomous lamp I just made.

It automatically turns on at a defined threshold, when the ambient light starts to dim it turns on full bright white, when there is little light it dims and when it almost all black it shines red to keep the night vision.

You’ll need:

Me baseboard Orion
Me light sensor
Me rgb led
Me hardware to build the lamp itself

Here is the code:

Sorry if somebody could tell me how to paste here the code I’ll do it right away.