01 Change Bumblebee's Eye Color

Change Bumblebee's Eye Color

/* Turn on Bumblebee's LED eyes */ #include "LEDStrip.h" //The LEDStrip.h library gives your code access to special functions exclusive to the LED pixels LEDStrip pixels = LEDStrip(3,13,12); //Set up the pixels by defining how many pixels and which pins of the microchip are used (always 13 and 12 on a Transformer) void setup(){} //Nothing in the void setup function, but it still needs to be here. void loop() { pixels.setPixel(0,222); //set LED pixel 0 (right eye) to a color value of 222 pixels.setPixel(1,111); //set LED pixel 1 to color 111 pixels.draw(); //send the color values to the LED pixels } //(c)2024 Let's Start Coding. License: www.letsstartcoding.com/bsdlicense
 

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!


 

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.