LarsonAnimation

class phoenix5.led.LarsonAnimation(r: int, g: int, b: int, w: int = 0, speed: float = 1, numLed: int = -1, mode: phoenix5._ctre.led.LarsonAnimation.BounceMode = <BounceMode.Front: 0>, size: int = 2, ledOffset: int = 0)

Bases: BaseTwoSizeAnimation

Animation that sends a pocket of light across the LED strip.

Constructor for a LarsonAnimation

Parameters:
  • r – How much red should the color have [0, 255]

  • g – How much green should the color have [0, 255]

  • b – How much blue should the color have [0, 255]

  • w – How much white should the color have [0, 255]

  • speed – How fast should the color travel the strip [0, 1]

  • numLed – The number of LEDs the CANdle will control

  • mode – How the pocket of LEDs will behave once it reaches the end of the strip

  • size – How large the pocket of LEDs are [0, 7]

  • ledOffset – Where to start the animation

class BounceMode(value: int)

Bases: pybind11_object

How the pocket of light behaves when it reaches the end of the strip

Members:

Front : Bounce the pocket as soon as the first LED reaches the end of the strip

Center : Bounce the pocket once it is midway through the end of the strip

Back : Bounce the pocket once all the LEDs are off the strip

Back = <BounceMode.Back: 2>
Center = <BounceMode.Center: 1>
Front = <BounceMode.Front: 0>
property name
property value
setBounceMode(mode: phoenix5._ctre.led.LarsonAnimation.BounceMode) None

Sets the bounce mode of the animation.

Parameters:

mode – How the pocket of LEDs will behave once it reaches the end of the strip

setSize(size: int) None

Sets the size of the pocket of LEDs

Parameters:

size – The size of the pocket [0, 7]