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

Clap detection #151

Open microbit-carlos opened 1 year ago

microbit-carlos commented 1 year ago

CODAL has added a "clap" event, similar to "loud" and "quiet".

microbit-carlos commented 2 months ago

For the set_threshold() method we'll need to throw an exception if the "clap" event is provided, as that threshold cannot be configured.

dpgeorge commented 1 month ago

SoundEvent.CLAP is added in 8b8c1d3802164abe40659edde9cf3a717aabfde4

For the set_threshold() method we'll need to throw an exception if the "clap" event is provided,

This is also done (didn't need any changes, was already raising an exception for invalid sound events).