# Update to match the pin connected to your NeoPixels
pixel_pin = board.A3
# Update to match the number of NeoPixels you have connected
pixel_num = 30
pixels = neopixel.NeoPixel(pixel_pin, pixel_num, brightness=0.5, auto_write=False)
comet = Comet(pixels, speed=0.02, color=JADE, tail_length=10, bounce=True)
while True:
comet.animate()
Note the line where you create the comet object. There are a number of items inside
the parentheses. In this case, you're provided with a fully working example. But what
if you want to change how the comet works? The code alone does not explain what
the options mean.
So, in the API Reference documentation list, click theī¤
adafruit_led_animation.animation.comet link and scroll down a bit until you
see the following.
Look familiar? It is! This is the documentation for setting up the comet object. It
explains what each argument provided in the comet setup in the code meant, as well
as the other available features. For example, the code includes speed=0.02 . The
documentation clarifies that this is the "Animation speed in seconds". The code
doesn't include ring . The documentation indicates this is an available setting that
enables "Ring mode".
This type of information is available for any function you would set up in your code. If
you need clarification on something, wonder whether there's more options available,
or are simply interested in the details involved in the code you're writing, check out
the documentation for the CircuitPython libraries!
©Adafruit Industries Page 79 of 263