File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99
1010Remove this line and all of the following docstring content before submitting to the Learn repo.
1111
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.
1313Update the following pin name to a viable pin:
1414* AUDIO_OUTPUT_PIN
1515"""
1818import math
1919import board
2020from 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
3122
3223audio = AudioOut (board .AUDIO_OUTPUT_PIN )
3324
Original file line number Diff line number Diff line change 88
99Remove this line and all of the following docstring content before submitting to the Learn repo.
1010
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.
1212Update the following pin name to a viable pin:
1313* AUDIO_OUTPUT_PIN
1414"""
1515import board
1616from 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
2718
2819audio = AudioOut (board .AUDIO_OUTPUT_PIN )
2920
You can’t perform that action at this time.
0 commit comments