support for setting music pin using analogSetPitchPin

This commit is contained in:
Peli de Halleux
2016-11-29 08:59:54 -08:00
parent 63d0b86508
commit 63e24ce90a
9 changed files with 56 additions and 32 deletions

View File

@ -138,7 +138,6 @@ namespace music {
//% blockId=device_play_note block="play|tone %note=device_note|for %duration=device_beat" icon="\uf025" blockGap=8
//% parts="headphone"
export function playTone(frequency: number, ms: number): void {
pins.analogSetPitchPin(AnalogPin.P0);
pins.analogPitch(frequency, ms);
}
@ -150,7 +149,6 @@ namespace music {
//% blockId=device_ring block="ring tone (Hz)|%note=device_note" icon="\uf025" blockGap=8
//% parts="headphone"
export function ringTone(frequency: number): void {
pins.analogSetPitchPin(AnalogPin.P0);
pins.analogPitch(frequency, 0);
}