fixing music simulator

This commit is contained in:
Peli de Halleux
2016-11-15 22:28:05 -08:00
parent 4be57eee9a
commit 903c0ec6bd
3 changed files with 12 additions and 22 deletions

View File

@ -140,6 +140,16 @@ namespace music {
playTone(0, ms);
}
/**
* Plays a tone through ``speaker``.
* @param frequency pitch of the tone to play in Hertz (Hz)
*/
//% help=music/ring-tone weight=80
//% blockId=device_ring block="ring tone (Hz)|%note=device_note" icon="\uf025" blockGap=8
//% parts="speaker" async
export function ringTone(frequency: number) {
playTone(frequency, 0);
}
/**
* Gets the frequency of a note.