Play musical note on specified pin on BBC micro:bit
Simulink Coder Support Package for BBC micro:bit/Audio
The Play Note block plays a musical note on a speaker connected to the specified pin on a BBC micro:bit. The note played corresponds to the input frequency.
The block has one input port.
Port_1(Frequency)— Frequency of the musical note to be played
The frequency (in Hz) corresponding to the musical note to be played. The input frequency can be derived from the output of a Note Generator block or from the output of a constant block or a wave block.
Pin— Number of pin connected to speaker
The number of the pin on the BBC micro:bit that is connected to the speaker intended to play the musical note.