I attempted to run the simpletest for this library on a PyPortal with 7.1.0 beta release. I tried board.SPEAKER and board.AUDIO_OUT as well as board.A0 though I suspect all of them are aliases for the same pin so it shouldn't make a difference.
All of them fail the same way and print this error:
Traceback (most recent call last):
File "code.py", line 38, in <module>
File "/lib/adafruit_rtttl.py", line 203, in play
ValueError: Invalid pin
I peeked briefly into the code and I think there might be an issue with the logic that determines whether audioio module is available on a given device / pin. I think that should be available on my pyportal but this library is ending up with False for the value of AUDIOIO_AVAILABLE variable which is making it try PWM instead which ultimately raises the error above.
I attempted to run the simpletest for this library on a PyPortal with 7.1.0 beta release. I tried
board.SPEAKER
andboard.AUDIO_OUT
as well asboard.A0
though I suspect all of them are aliases for the same pin so it shouldn't make a difference.All of them fail the same way and print this error:
I peeked briefly into the code and I think there might be an issue with the logic that determines whether
audioio
module is available on a given device / pin. I think that should be available on my pyportal but this library is ending up withFalse
for the value ofAUDIOIO_AVAILABLE
variable which is making it try PWM instead which ultimately raises the error above.