Skip to content

audio.play sets pin1 high and leaves it that way #728

Description

@kevinjwalters

I noticed that audio.play which is documented as having defaults of pin0 and no return_pin will set pin1 and will leave it that way.

MicroPython v1.9.2-34-gd64154c73 on 2017-09-01; micro:bit v1.0.1 with nRF51822
Type "help()" for more information.
>>>
>>> import audio
>>> frame = audio.AudioFrame()
>>> audio.play([frame] * 20)  # this will set pin1 high
>>> audio.play([frame] * 20, pin=pin0)  # pin1 still high after this
>>> pin1.read_digital()  # set to read mode
1
>>> audio.play([frame] * 20, pin=pin0) # this just plays on pin0, pin1 now unaffected

This happens to be on a microbit V1, haven't tried a V2.

BTW, can mono audio be sent to two pins?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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