updates for zelda prop

minor updates for zelda prop code
This commit is contained in:
Liz 2024-10-07 10:57:52 -04:00
parent 9405bd254b
commit e6043f98bb

View file

@ -19,6 +19,7 @@ SWING_2_THRESHOLD = 170
pixel_time = 10 pixel_time = 10
Y_THRESHOLD = -9.0 Y_THRESHOLD = -9.0
VERTICAL_TIME = 1.0 # Time in seconds the sensor needs to be vertical to trigger
fx_1 = audiocore.WaveFile(open("/sounds/swing1.wav", "rb")) fx_1 = audiocore.WaveFile(open("/sounds/swing1.wav", "rb"))
fx_2 = audiocore.WaveFile(open("/sounds/swing1b.wav", "rb")) fx_2 = audiocore.WaveFile(open("/sounds/swing1b.wav", "rb"))
@ -32,7 +33,7 @@ mixer = audiomixer.Mixer(voice_count=3, sample_rate=22050, channel_count=1,
audio.play(mixer) audio.play(mixer)
# external neopixels # external neopixels
num_pixels = 50 num_pixels = 60
pixels = neopixel.NeoPixel(board.EXTERNAL_NEOPIXELS, num_pixels, auto_write=False) pixels = neopixel.NeoPixel(board.EXTERNAL_NEOPIXELS, num_pixels, auto_write=False)
pixels.brightness = 0.2 pixels.brightness = 0.2
@ -60,7 +61,6 @@ mode = 0
brightness = 0 brightness = 0
increasing = True increasing = True
pixel_clock = ticks_ms() pixel_clock = ticks_ms()
VERTICAL_TIME = 2.0 # Time in seconds the sensor needs to be vertical to trigger
# Variables to track time # Variables to track time
vertical_start_time = None vertical_start_time = None