Closed microbit-matt-hillsdon closed 2 years ago
https://microbit-micropython.readthedocs.io/en/v2-docs/microphone.html#microbit.microphone.current_event says "return: the name of the last recorded sound event, SoundEvent('loud') or SoundEvent('quiet')"
In practice it seems that the first result is None:
>>> repr(microphone.current_event()) 'None' >>> repr(microphone.current_event()) "SoundEvent('quiet')"
should the docs be updated to mention this or is it a bug in the implementation?
This looks like a bug and should probably return the "quiet" event for the first call.
Fixed by 69c8ddc8229bef1a6f811580b21ded83a2049166
https://microbit-micropython.readthedocs.io/en/v2-docs/microphone.html#microbit.microphone.current_event says "return: the name of the last recorded sound event, SoundEvent('loud') or SoundEvent('quiet')"
In practice it seems that the first result is None:
should the docs be updated to mention this or is it a bug in the implementation?