Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ deploy:

install:
- pip install pylint circuitpython-build-tools Sphinx sphinx-rtd-theme
- pip install --force-reinstall pylint==1.9.2

script:
- pylint adafruit_circuitplayground/*.py
Expand Down
7 changes: 4 additions & 3 deletions examples/pixels_simpletest.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,24 @@
import time
from adafruit_circuitplayground.express import cpx


# The number of pixels in the strip
numpix = 10


def wheel(pos):
# Input a value 0 to 255 to get a color value.
# The colours are a transition r - g - b - back to r.
if (pos < 0) or (pos > 255):
return (0, 0, 0)
if pos < 85:
return (int(pos * 3), int(255 - (pos*3)), 0)
elif pos < 170:
if pos < 170:
pos -= 85
return (int(255 - pos*3), 0, int(pos*3))
#else:
pos -= 170
return (0, int(pos*3), int(255 - pos*3))


def rainbow_cycle(wait):
for j in range(255):
for i in range(cpx.pixels.n):
Expand All @@ -29,6 +29,7 @@ def rainbow_cycle(wait):
cpx.pixels.show()
time.sleep(wait)


cpx.pixels.auto_write = False
cpx.pixels.brightness = 0.3
while True:
Expand Down