File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ deploy:
23
23
24
24
install :
25
25
- pip install pylint circuitpython-build-tools Sphinx sphinx-rtd-theme
26
+ - pip install --force-reinstall pylint==1.9.2
26
27
27
28
script :
28
29
- pylint adafruit_circuitplayground/*.py
Original file line number Diff line number Diff line change 3
3
import time
4
4
from adafruit_circuitplayground .express import cpx
5
5
6
-
7
6
# The number of pixels in the strip
8
7
numpix = 10
9
8
9
+
10
10
def wheel (pos ):
11
11
# Input a value 0 to 255 to get a color value.
12
12
# The colours are a transition r - g - b - back to r.
13
13
if (pos < 0 ) or (pos > 255 ):
14
14
return (0 , 0 , 0 )
15
15
if pos < 85 :
16
16
return (int (pos * 3 ), int (255 - (pos * 3 )), 0 )
17
- elif pos < 170 :
17
+ if pos < 170 :
18
18
pos -= 85
19
19
return (int (255 - pos * 3 ), 0 , int (pos * 3 ))
20
- #else:
21
20
pos -= 170
22
21
return (0 , int (pos * 3 ), int (255 - pos * 3 ))
23
22
23
+
24
24
def rainbow_cycle (wait ):
25
25
for j in range (255 ):
26
26
for i in range (cpx .pixels .n ):
@@ -29,6 +29,7 @@ def rainbow_cycle(wait):
29
29
cpx .pixels .show ()
30
30
time .sleep (wait )
31
31
32
+
32
33
cpx .pixels .auto_write = False
33
34
cpx .pixels .brightness = 0.3
34
35
while True :
You can’t perform that action at this time.
0 commit comments