(Practice 2-2) To control LEDs in the desired shapes - Advanced, you need to understand the concepts of [Lists] and [Loops].
(Example) Turning on LED in Heart Shape (R:250, G:150, B:150)
(1-1) When Storing All LEDs in the heart Variable
Create a heart [variable] and declare a [list] with the LED numbers required for the heart shape.
Use the [Repeat List] block to set the LED colors.
(1-2) When Storing LED Numbers Required for the Left Heart Shape
Create a heart [variable] and declare a [list] with the LED numbers required for the left heart shape.
To set the left and right LEDs in the same shape, set the LED at the position of the left LED number + 25 to the desired color.
Last updated 11 months ago