Give the neopixel a new random color on every turn of the loop.
This tutorial is part of the Nairda learning path. You can build it step by step inside the app, which checks every block you place before letting you move on.
The steps
- We add a While loop, which repeats forever.
- We declare a neopixel of 1 led on pin 9.
- Inside the loop we put a delay of 100 milliseconds.
- Behind it we put the neopixel block.
- Its blue is a random number from 0 to 100.
- Its green is another random number from 0 to 100.
- And its red is a third random number, so the color keeps changing.
When you finish, the app takes you straight to the next tutorial in the path.