bbcmicrobit / bbcmicrobit/micropython
audio.play sets pin1 high and leaves it that way
- Dominant language
- C
- Stars
- 646
- Forks
- 290
- PR merge metrics
- No merged PRs in 30d
Description
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?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.