Skip to content

Commit 678baaf

Browse files
authored
Merge pull request #23 from adafruit/dherrada-patch-1
Moved from pulseio.PWMOut to pwmio.PWMOut
2 parents 7eadf52 + 2a01a78 commit 678baaf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

adafruit_rtttl.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
import sys
1818
import time
19-
import pulseio
19+
import pwmio
2020

2121
AUDIOIO_AVAILABLE = False
2222
try:
@@ -112,7 +112,7 @@ def _get_wave(tune, octave):
112112
# pylint: disable-msg=too-many-arguments
113113
def _play_to_pin(tune, base_tone, min_freq, duration, octave, tempo):
114114
"""Using the prepared input send the notes to the pin"""
115-
pwm = isinstance(base_tone, pulseio.PWMOut)
115+
pwm = isinstance(base_tone, pwmio.PWMOut)
116116
for note in tune.split(","):
117117
piano_note, note_duration = _parse_note(note, duration, octave)
118118
if piano_note in PIANO:
@@ -179,7 +179,7 @@ def play(pin, rtttl, octave=None, duration=None, tempo=None):
179179

180180
# Fall back to PWM
181181
if not base_tone:
182-
base_tone = pulseio.PWMOut(pin, duty_cycle=0, variable_frequency=True)
182+
base_tone = pwmio.PWMOut(pin, duty_cycle=0, variable_frequency=True)
183183

184184
_play_to_pin(tune, base_tone, min_freq, duration, octave, tempo)
185185

0 commit comments

Comments
 (0)