Control LED Colors with Bumblebee’s Light Sensor | Transformers STEM Kit for Kids 8-12 — Let's Start Coding | Coding for Kids

15 Light Sensor Sets Pixels

Set the LED Pixel Color with Light Sensor

1
2
/* Use the light sensor to control the color of the LED rainbow pixels */
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 

Walkthrough Video

Watch the video for a line-by-line explanation of how the example program works. Then you'll be ready to make some changes of your own!

LED Pixel Color Spectrum


Use this spectrum to estimate the color values you'll need for your 'setPixel' arguments to achieve your favorite color!


This graphic represents how some values from the light sensor will be 'mapped' onto the pixel colors.

 

Challenges

Can you complete the challenges? Change the code in your code editor above. Upload your code to see the effect when you're finished. Complete a challenge? Check it off the list!


TRANSFORMERS and HASBRO and all related trademarks and logos are trademarks of Hasbro, Inc. ©2024 Hasbro.

Share