Skip to content

music.stop pin argument #31

@microbit-carlos

Description

@microbit-carlos

The music.stop() function can take a pin argument like play().

Does it currently correctly process tuples? It doesn't throw an error, but don't know if it works as expected.
Technically in this case the user could also do music.stop(pin=pin_speaker) and music.stop(pin=pin0) to stop the music in both pins, but it does make sense to mirror play.

I guess my question is how having music play over multiple pins is going to interact with the stop function. Will it work when doing play(..., pin=(pin_speaker, pin0)) and then we only want to stop a single pin music.stop(pin=pin0)?

This on the REPL currently stops the music playing in the speaker

>>> music.play(music.PYTHON, wait=False)
>>> music.stop(pin0)

Another thing to consider for #30 as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions