Update Pumpkin Theremin Code
remove import neopixel remove pass on try/except, put break instead after sleep Sophy will have to test this
This commit is contained in:
parent
b8ad3751de
commit
94d5a3e8f7
1 changed files with 1 additions and 2 deletions
|
|
@ -1,7 +1,6 @@
|
|||
import time
|
||||
import board
|
||||
import adafruit_hcsr04
|
||||
import neopixel
|
||||
from adafruit_circuitplayground.express import cpx
|
||||
|
||||
# This line creates the distance sensor as an object.
|
||||
|
|
@ -28,8 +27,8 @@ while True:
|
|||
print("Distance:", handDistance)
|
||||
except RuntimeError:
|
||||
print("retrying!")
|
||||
pass
|
||||
time.sleep(.00001)
|
||||
break
|
||||
|
||||
pitch = handDistance*pitchMultiplier
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue