Skip to content

Add option to get Sound Level in decibels (dB) #170

Closed
@microbit-carlos

Description

@microbit-carlos

CODAL has the option choose between 8-bit and dB for the LevelDetector. We had a couple of requests and it's already built in CODAL, so it'd be good to have it in the next beta.

API Options:

  • Adding an argument to microphone.sound_level(), possibly microphone.sound_level(db=True)?
  • Creating a new function like microphone.sound_level_db()
  • Change units via different method, e.g. microphone.set_sound_level_unit(microphone.SOUND_LEVEL_DB)
    • This would be my least preferred option

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions