👩‍💻 Coding with FastLED Blocks! | myBetabox

👩‍💻 Coding with FastLED Blocks!

Using FastLED Blocks!

To program our holiday lights, we will be using the FastLED library which will give us the needed code to control our lights.

To access these blocks, simply click on Add-ons in your toolbox and find the FastLED section.

All code will need a setup block before it is able to run and the settings in this block must be set a certain way for our specific light strip. Input the following settings into your setup block:

  • Analog Data Pin: 6
  • Type: WS2811
  • Color Order: GRB
  • Number of LEDs: 150

The brightness can be set to whatever number you want between 1 and 255 but we suggest somewhere around 150 to 200.

Double check your block against the picture below:

Once you have added your setup block, you will be able to add your color change blocks to the main loop!

The color change blocks will run from 1 to 150 and will change the color on that single light. When you click on the color, you will be able to pick your color from the color wheel!

Try playing around with these blocks to create a simple pattern in the simulator!