a circuit playground express wizard staff

stick.py 330B

12345678910111213141516
  1. import analogio
  2. import blinkenring
  3. import board
  4. import dotstar
  5. import neopixel
  6. import time
  7. import urandom
  8. random_pin = analogio.AnalogIn(board.A1)
  9. urandom.seed(random_pin.value)
  10. stick = blinkenring.BlinkenRing(board.D0, 8, 4)
  11. stick.increment = -1
  12. while True:
  13. # stick.party_mode = True
  14. stick.animate()
  15. time.sleep(0.2)