This commit is contained in:
ladyada 2018-05-29 21:46:18 -04:00
parent fcfc647414
commit 36373a24cb

View file

@ -1,11 +1,11 @@
import time
#import math
import array
from digitalio import DigitalInOut, Direction, Pull from digitalio import DigitalInOut, Direction, Pull
import analogio import analogio
import supervisor import supervisor
import array
import math
import audioio import audioio
import board import board
import time
import neopixel import neopixel
# NeoPixels # NeoPixels
@ -79,7 +79,7 @@ play_file("01_approach.wav")
while not button_a.value: while not button_a.value:
pass # wait for it to be pressed pass # wait for it to be pressed
if button_a.value: # A pressed if button_a.value: # A pressed
while button_a.value: # wait for release while button_a.value: # wait for release
pass pass
@ -94,7 +94,7 @@ timeout = time.monotonic()
while True: while True:
print((light.value,)) print((light.value,))
# determine height of pixels # determine height of pixels
pixel_height = map_range(light.value, DARK, BRIGHT, 0, num_pixels) pixel_height = map_range(light.value, DARK, BRIGHT, 0, num_pixels)
pixels.fill((0, 0, 0)) pixels.fill((0, 0, 0))