Gracie Sanabria
Published

True Colors

Light sensor changes color when a light is flashed onto it. The black and white frame becomes somewhat colorful with additional light.

BeginnerFull instructions provided55
True Colors

Things used in this project

Hardware components

Circuit Playground Express
Adafruit Circuit Playground Express
×1

Software apps and online services

MakeCode
Microsoft MakeCode

Story

Read more

Custom parts and enclosures

Video Demonstration

Flipping Toggle Switch ON and OFF. Demonstrating Light Sensor changing LED colors. Video link: https://youtube.com/shorts/xeuBFfIXP50?feature=share

MakeCode code

Frame with character

White light

Light sensor working and showing colorful LEDs

Wires

"True colors" showing

Code

Light

Arduino
This is the code I used. It is a combination of the Make it Switch code and Make it Sense code. Whenever the Toggle Switch is flipped to ON, it will begin to sense ambient light. There are two thresholds for ambient light, one for light and one for lack of light. When the Toggle Switch is flipped, OFF, the LEDs on the board will turn off.

Depending on the threshold, the board will accordingly change its LEDs. When the board detects more light, the LEDs will become colorful. When the board detects less light, the LEDs will become a bright white.
No preview (download only).

Credits

Gracie Sanabria
4 projects • 2 followers
Contact

Comments

Please log in or sign up to comment.