diff --git a/adafruit_led_animation/animation/rainbow.py b/adafruit_led_animation/animation/rainbow.py index 5c2b35b..2825fb0 100644 --- a/adafruit_led_animation/animation/rainbow.py +++ b/adafruit_led_animation/animation/rainbow.py @@ -123,3 +123,15 @@ def reset(self): Resets the animation. """ self._generator = self._color_wheel_generator() + + @property + def period(self) -> float: + """ + Period to cycle the rainbow over in seconds. + """ + return self._period + + @period.setter + def period(self, new_value: float) -> None: + self._period = new_value + self.reset()