Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
fadeOn
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
i would like to do some animations - and to start with the sequence i like some fadeOn animation.
sadly i did not find a simple way to do this..
i tried with
# SPDX-FileCopyrightText: 2021 Kattni Rembor for Adafruit Industries # SPDX-License-Identifier: MIT # based on # https://learn.adafruit.com/circuitpython-led-animations/basic-animations#full-example-code-3063749 """ just fadeOn to a solid color - wait a little and fadeOff again. """ import time import board # from adafruit_led_animation.animation.pulse import Pulse from adafruit_led_animation.animation.colorcycle import ColorCycle from adafruit_led_animation.color import ( AMBER, BLACK, ) from adafruit_led_animation.sequence import AnimateOnce # Update to match the number of NeoPixels you have connected pixel_num = 1 print("\n\n") print("fade experiment") if hasattr(board, "APA102_SCK"): import adafruit_dotstar pixels = adafruit_dotstar.DotStar( board.APA102_SCK, board.APA102_MOSI, pixel_num, auto_write=False ) else: import neopixel pixels = neopixel.NeoPixel(board.NEOPIXEL, pixel_num, auto_write=False) pixels.brightness = 0.3 fadeOnCC = ColorCycle(pixels, speed=5, colors=[BLACK, AMBER]) fadeOffCC = ColorCycle(pixels, speed=5, colors=[AMBER, BLACK]) fadeOn = AnimateOnce( fadeOnCC, # auto_clear=False, # auto_reset=True, advance_interval=5, ) fadeOff = AnimateOnce( fadeOffCC, # auto_clear=False, # auto_reset=True, advance_interval=5, ) print("wait 5sec") time.sleep(5) print("start fadeOn:") while fadeOn.animate(): pass print("done.") print("wait 5sec") time.sleep(5) print("start fadeOff:") while fadeOff.animate(): pass print("done.") print("wait 10sec") time.sleep(10) print("done with this script. exiting.") # while True: # pass
i think i am missing some basics here..
i think a working example just for a fadeIn and fadeOut is a good idea for the documentation :-)
fadeIn
fadeOut
The text was updated successfully, but these errors were encountered:
No branches or pull requests
i would like to do some animations - and to start with the sequence i like some
fadeOn
animation.sadly i did not find a simple way to do this..
i tried with
i think i am missing some basics here..
i think a working example just for a
fadeIn
andfadeOut
is a good idea for the documentation :-)The text was updated successfully, but these errors were encountered: