Skip to content

Commit a702405

Browse files
committed
fixing whitespace
1 parent f658ced commit a702405

File tree

2 files changed

+4
-22
lines changed
  • CircuitPython_Templates

2 files changed

+4
-22
lines changed

CircuitPython_Templates/pwm_tone_playback/code.py

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
1010
Remove 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.
1313
Update the following pin name to a viable pin:
1414
* AUDIO_OUTPUT_PIN
1515
"""
@@ -18,16 +18,7 @@
1818
import math
1919
import board
2020
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
3122

3223
audio = AudioOut(board.AUDIO_OUTPUT_PIN)
3324

CircuitPython_Templates/pwm_wav_playback/code.py

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,13 @@
88
99
Remove 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.
1212
Update the following pin name to a viable pin:
1313
* AUDIO_OUTPUT_PIN
1414
"""
1515
import board
1616
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
2718

2819
audio = AudioOut(board.AUDIO_OUTPUT_PIN)
2920

0 commit comments

Comments
 (0)