Try changing the numbers in the tuples to change your LED to any color of the rainbow. Or, you can add more lines
with different color tuples to add more colors to the sequence. Always add the
time.sleep()
, but try changing the
amount of time to create different cycle animations!
Making Rainbows (Because Who Doesn't Love 'Em!)
Coding a rainbow effect involves a little math and a helper function called
wheel
. For details about how wheel works,
see
this explanation here
(https://adafru.it/Bek)
!
© Adafruit Industries
https://learn.adafruit.com/adafruit-feather-m4-express-atsamd51
Page 130 of 183