Skip to content

Invalid Pin error on PyPortal #28

Closed
@FoamyGuy

Description

@FoamyGuy

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions