918af4f3ac
* change simulator svg * change radio image * Remove google fonts cdn * change color of 'advanced' button * font fix * font fix 2 * display fix * change fullsceen simulator bg * Continuous servo * handle continuous state * adding shims * update rendering for continuous servos * fixing sim * fix sig * typo * fix sim * bump pxt * bump pxt * rerun travis * Input blocks revision - add Button and Pin event types - merge onPinPressed & onPinReleased in new onPinEvent function - create new onButtonEvent function * update input blocks in docs and tests * remove device_pin_release block * Hide DAL.x behind Enum * bring back deprecated blocks, but hide them * shims and locales files * fix input.input. typing * remove buildpr * bump V3 * update simulator aspect ratio * add Loudness Block * revoke loudness block * Adds soundLevel To be replaced by pxt-common-packages when DAL is updated. * Remove P0 & P3 from AnalogPin Co-authored-by: Juri <gitkraken@juriwolf.de>
34 lines
1.1 KiB
TypeScript
34 lines
1.1 KiB
TypeScript
// Auto-generated. Do not edit.
|
|
declare namespace input {
|
|
|
|
/**
|
|
* Registers an event that runs when a loud sound is detected
|
|
*/
|
|
//% help=input/on-loud-sound
|
|
//% blockId=input_on_loud_sound block="on loud sound"
|
|
//% parts="microphone"
|
|
//% weight=88 blockGap=12 shim=input::onLoudSound
|
|
function onLoudSound(handler: () => void): void;
|
|
|
|
/**
|
|
* Reads the loudness through the microphone from 0 (silent) to 255 (loud)
|
|
*/
|
|
//% help=input/sound-level
|
|
//% blockId=device_get_sound_level block="sound level"
|
|
//% parts="microphone"
|
|
//% weight=34 blockGap=8 shim=input::soundLevel
|
|
function soundLevel(): int32;
|
|
|
|
/**
|
|
* Sets the minimum threshold for a loud sound
|
|
*/
|
|
//% help=input/set-loud-sound-threshold
|
|
//% blockId=input_set_loud_sound_threshold block="set loud sound threshold %value"
|
|
//% parts="microphone"
|
|
//% value.min=1 value.max=255
|
|
//% group="More" weight=14 blockGap=8 shim=input::setLoudSoundThreshold
|
|
function setLoudSoundThreshold(value: int32): void;
|
|
}
|
|
|
|
// Auto-generated. Do not edit. Really.
|