Update gemma_m0_clockwork_goggles.py

Updated code to include lines for RGB vs RGBW NeoPixels
This commit is contained in:
John Edgar Park 2017-10-03 13:59:37 -07:00 committed by GitHub
parent 0055ca9323
commit 4cf9e8429f

View file

@ -10,10 +10,17 @@ pixpinLeft = board.D1 #Data In attached to Gemma pin D1
pixpinRight = board.D0 #Data In attached to Gemma pin D0
numpix = 16
#Use these lines for RGBW NeoPixels
stripLeft = neopixel.NeoPixel(pixpinLeft, numpix, bpp=4, brightness=.18,
auto_write=False)
stripRight = neopixel.NeoPixel(pixpinRight, numpix, bpp=4, brightness=.18,
auto_write=False)
#uncomment the lines below for RGB NeoPixels
#stripLeft = neopixel.NeoPixel(pixpinLeft, numpix, bpp=3, brightness=.18,
# auto_write=False)
#stripRight = neopixel.NeoPixel(pixpinRight, numpix, bpp=3, brightness=.18,
# auto_write=False)
def cog(pos):
# Input a value 0 to 255 to get a color value.