microbit-foundation / micropython-microbit-v2

Temporary home for MicroPython for micro:bit v2 as we stablise it before pushing upstream
MIT License
41 stars 22 forks source link

Calling `microphone.sound_level` once keeps the microphone LED on #175

Open microbit-carlos opened 3 months ago

microbit-carlos commented 3 months ago

Described in: https://github.com/microbit-foundation/micropython-microbit-v2/issues/175#issuecomment-2017797401

dpgeorge commented 3 months ago

When calling microphone.sound_level(), the code should not register a listener on the CODAL message bus. That's not required and is keeping the microphone LED on.

microbit-carlos commented 3 months ago

Yes, the CODAL_STREAM_IDLE_TIMEOUT_MS was implemented in https://github.com/lancaster-university/codal-core/commit/a1e1db692909a260ab341c89b292e085daecd259 and it's currently set to 75 ms: lancaster-university/codal-core/inc/core/CodalConfig.h#L224