File tree Expand file tree Collapse file tree 2 files changed +4
-22
lines changed Expand file tree Collapse file tree 2 files changed +4
-22
lines changed Original file line number Diff line number Diff line change 9
9
10
10
Remove this line and all of the following docstring content before submitting to the Learn repo.
11
11
12
- Update the audio out pin to match the wiring chosen for the microcontroller.
12
+ Update the audio out pin to match the wiring chosen for the microcontroller.
13
13
Update the following pin name to a viable pin:
14
14
* AUDIO_OUTPUT_PIN
15
15
"""
18
18
import math
19
19
import board
20
20
from audiocore import RawSample
21
-
22
- try :
23
- from audioio import AudioOut
24
- print ("Using AudioOut" )
25
- except ImportError :
26
- try :
27
- from audiopwmio import PWMAudioOut as AudioOut
28
- print ("Using PWMAudioOut" )
29
- except ImportError :
30
- pass
21
+ from audiopwmio import PWMAudioOut as AudioOut
31
22
32
23
audio = AudioOut (board .AUDIO_OUTPUT_PIN )
33
24
Original file line number Diff line number Diff line change 8
8
9
9
Remove this line and all of the following docstring content before submitting to the Learn repo.
10
10
11
- Update the audio out pin to match the wiring chosen for the microcontroller.
11
+ Update the audio out pin to match the wiring chosen for the microcontroller.
12
12
Update the following pin name to a viable pin:
13
13
* AUDIO_OUTPUT_PIN
14
14
"""
15
15
import board
16
16
from audiocore import WaveFile
17
-
18
- try :
19
- from audioio import AudioOut
20
- print ("Using AudioOut" )
21
- except ImportError :
22
- try :
23
- from audiopwmio import PWMAudioOut as AudioOut
24
- print ("Using PWMAudioOut" )
25
- except ImportError :
26
- pass # not always supported by every board!
17
+ from audiopwmio import PWMAudioOut as AudioOut
27
18
28
19
audio = AudioOut (board .AUDIO_OUTPUT_PIN )
29
20
You can’t perform that action at this time.
0 commit comments