File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import time
12import board
23from digitalio import DigitalInOut , Direction , Pull
34import audioio
45import neopixel
5- import time
66
77filename = "electrons.wav"
88
9- # What pad our button is connected to:
9+ # The pad our button is connected to:
1010button = DigitalInOut (board .A4 )
1111button .direction = Direction .INPUT
1212button .pull = Pull .UP
@@ -34,14 +34,13 @@ def simpleCircle(wait):
3434 time .sleep (wait )
3535
3636# Audio Play File
37- def play_file (filename ):
38- print ("Playing File" + filename )
39- wave_file = open (filename , "rb" )
37+ def play_file (playname ):
38+ print ("Playing File " + playname )
39+ wave_file = open (playname , "rb" )
4040 with audioio .WaveFile (wave_file ) as wave :
4141 with audioio .AudioOut (board .A0 ) as audio :
4242 audio .play (wave )
4343 while audio .playing :
44- pass
4544 simpleCircle (.02 )
4645 print ("finished" )
4746
You can’t perform that action at this time.
0 commit comments