fixed interface function names, add sound functionality

This commit is contained in:
Matthias L. Jugel
2016-10-27 17:44:38 +02:00
parent e0735188fa
commit 96d5dc2064
5 changed files with 170 additions and 63 deletions

12
libs/core/shims.d.ts vendored
View File

@ -524,6 +524,18 @@ declare namespace motors {
//% parts=dcmotor shim=motors::motorOn
function motorOn(power: number): void;
}
declare namespace music {
/**
* Plays a tone through ``speaker`` for the given duration.
* @param frequency pitch of the tone to play in Hertz (Hz)
* @param ms tone duration in milliseconds (ms)
*/
//% help=music/play-tone weight=90
//% blockId=device_play_note block="play|tone %note=device_note|for %duration=device_beat" icon="\uf025" blockGap=8
//% parts="speaker" shim=music::playTone
function playTone(freqency: number, ms: number): void;
}
declare namespace pins {
/**