pylnit, code is stable

This commit is contained in:
Mikey Sklar 2018-09-04 16:34:55 -06:00
parent dbc5cf0f9a
commit 6846d50e6b
3 changed files with 6 additions and 7 deletions

View file

@ -4,7 +4,6 @@ import simpleio
import pulseio
import digitalio
# PWM is not available on Trinket D1
vibration_pin = board.D1 # vibration switch is connected
speaker_pin = board.D2 # PWM speaker
@ -30,8 +29,8 @@ def led_fade(brightness):
time.sleep(led_fade_delay)
while True:
# wait for vibration sensor detect
# play Super Mario Bros. Coin Sound
# wait for vibration sensor detect (reverse logic)
# play Super Mario Bros. coin sound
# fade LEDs
if not vpin.value:
led_fade((2 ** 16) - 1) # full brightness