From 0fb150be19d176513e98290f6ae8084b2bac63f6 Mon Sep 17 00:00:00 2001 From: Laurens Valk Date: Tue, 25 Aug 2020 12:37:02 +0200 Subject: [PATCH] api/common/LightGrid: add animate method --- pybricks/_common.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pybricks/_common.py b/pybricks/_common.py index ce4e9fd..5b18751 100644 --- a/pybricks/_common.py +++ b/pybricks/_common.py @@ -523,6 +523,20 @@ class LightGrid: """ pass + def animate(self, matrices, interval): + """Shows an animation of images in the same format as :meth:`.image`, + with a given interval between images. + + This method is non-blocking: the animation runs in the background while + the rest of your program keeps running. After all images have been + displayed, the animation repeats. + + Arguments: + matrix (list): List of Matrix of intensities. + interval (:ref:`time`): Time to display each image. + """ + pass + def pixel(self, row, column, brightness): """Turns on one pixel at the specified brightness.