Skip to content

microphone.current_event: first call returns None but docs don't mention the possibility of None #86

Closed
@microbit-matt-hillsdon

Description

@microbit-matt-hillsdon

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions