diff --git a/neopixel.py b/neopixel.py index 5bb4a1c..b84326f 100644 --- a/neopixel.py +++ b/neopixel.py @@ -236,8 +236,9 @@ class Neopixel: cut = 8 if self.W_in_mode: cut = 0 - for i in range(self.num_leds): - self.sm.put(self.pixels[i], cut) + sm_put = self.sm.put + for pixval in self.pixels: + sm_put(pixval, cut) time.sleep(self.delay) # Set all pixels to given rgb values