Skip to content

Commit fff05af

Browse files
authored
Update WS2812_NeoPixelRainbow.py
1 parent 974d9b2 commit fff05af

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

WS2812_NeoPixelRainbow.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def n(self):
3636
def _color(self, color):
3737
return tuple([round(c * self._brightness) for c in color])
3838

39-
def _wheel(self, pos):
39+
def wheel(self, pos):
4040
r, g, b = 0, 0, 0
4141
if pos < 0 or pos > 255:
4242
pass
@@ -58,7 +58,7 @@ def clear(self, color):
5858

5959
def rainbowCycle(self, cycle=0):
6060
for i in range(len(self._buffer)):
61-
self[i] = self._wheel((round(i * 255 / self.n) + cycle) & 255)
61+
self[i] = self.wheel((round(i * 255 / self.n) + cycle) & 255)
6262

6363
def rotate(self, clockwise=True):
6464
self[:] = (self[-1:] + self[:-1]) if clockwise else (self[1:] + self[:1])

0 commit comments

Comments
 (0)