Skip to content

Commit

Permalink
docs: Add microphone.sound_level_db() function.
Browse files Browse the repository at this point in the history
  • Loading branch information
microbit-carlos committed Sep 17, 2024
1 parent 905577a commit 477c214
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
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

0 comments on commit 477c214

Please sign in to comment.