Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Add microphone.sound_level_db() function. #803

Draft
wants to merge 1 commit into
base: v2-docs
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/microbit_micropython_api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ The Microphone is accessed via the `microphone` object::
set_threshold(128)
# Returns a representation of the sound pressure level in the range 0 to 255.
sound_level()
# Returns a representation of the sound pressure level in decibels (dB).
sound_level_db()

Pins
----
Expand Down
4 changes: 4 additions & 0 deletions docs/microphone.rst
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ Functions

:return: A representation of the sound pressure level in the range 0 to 255.

.. py:function:: sound_level_db()

:return: A representation of the sound pressure level in decibels (dB)
in the range of 52.0 to 110.0 dB.

Example
=======
Expand Down