l1nt0r
This commit is contained in:
parent
fcfc647414
commit
36373a24cb
1 changed files with 5 additions and 5 deletions
|
|
@ -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))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue