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 May 7, 2024
1 parent 2505216 commit 9e9ea1c
Show file tree
Hide file tree
Showing 2 changed files with 5 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
3 changes: 3 additions & 0 deletions docs/microphone.rst
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ 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).

Example
=======
Expand Down

0 comments on commit 9e9ea1c

Please sign in to comment.