diff --git a/adafruit_led_animation/sequence.py b/adafruit_led_animation/sequence.py index 2ec690c..fe522e9 100644 --- a/adafruit_led_animation/sequence.py +++ b/adafruit_led_animation/sequence.py @@ -179,6 +179,13 @@ def next(self): self.on_cycle_complete() self.activate(current % len(self._members)) + def previous(self): + """ + Jump to the previous animation. + """ + current = self._current - 1 + self.activate(current % len(self._members)) + def random(self): """ Jump to a random animation.