Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
kevinjwalters opened this issue Oct 16, 2021 · 0 comments
Open

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

kevinjwalters opened this issue Oct 16, 2021 · 0 comments

Comments

@kevinjwalters
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant