bbcmicrobit / bbcmicrobit/micropython

Music/Speech Pin detection problem

Open
#419 9 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
646
Forks
290
PR merge metrics
No merged PRs in 30d

Description

The micro:bit music module doesn't appear to detect that the speaker is connected to pins 0 and 1 (as it should) causing it to be silent or very quiet. However, once speech takes place the pins are correctly configured. I believe there is a detection step in the speech module that doesn't appear to occur for the music module.

To re-create, plug in a speaker to pins 0 and 1 and, try the following REPL interaction:

```
>>> import music
>>> music.play(music.NYAN) # very very quiet
>>> import speech
>>> speech.say("Hello") # at the correct volume
>>> music.play(music.NYAN) # at the correct volume
```

Music plays at the correct volume if I connect the speaker to pins 0 and GND (as we used to have to do). But part of the point of the new pin code / audio work was that it would correctly detect the use of non-ground pins (so speech would work better) and audio output would be at the correct volume.

I hope this makes sense. Happy to answer questions.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.