5f7a8e5301
* update yotta defaults for 16kb devices * refactor deprecated blocks * updates for button events * update button events * update refference * update docs * update docs * update button event blocks * update docs * update block id
937 B
937 B
set Built In Speaker Enabled
Enable the speaker on the @boardname@ to play music and sounds.
music.setBuiltInSpeakerEnabled(false)
The microbit v2 has a speaker on the board itself. You can enable the built-in speaker to play sounds instead having them an external speaker connected to the pitch pin.
~ reminder
This block requires the micro:bit V2 hardware. If you use this block with a micro:bit v1 board, you will see the 927 error code on the screen.
~
Parameters
- enabled: a boolean value that is
true
to enable the built-in speaker, orfalse
to send sounds to the pitch pin.
Example #example
Enable the built-in speaker play sounds.
music.setBuiltInSpeakerEnabled(true)
See also
music