diff --git a/libs/core/input.ts b/libs/core/input.ts index 3d8c7a78..001f07a3 100644 --- a/libs/core/input.ts +++ b/libs/core/input.ts @@ -77,29 +77,4 @@ namespace input { export function runningTimeMicros() { return control.micros(); } - - - /** - * gets the level of loudness in 0-100% - */ - //% blockId="loudness" - //% block="Loudness" - - export function loudness(): number { - let value = 0 - let max = 0 - let min = 1023 - for (let index = 0; index < 32; index++) { - value = pins.analogReadPin(50) - if (value > max) { - max = value - } else if (value < min) { - min = value - } - } - value = (max - min) * 977 / 10000 - return value - } - - }