Skip to content

Commit 477c214

Browse files
docs: Add microphone.sound_level_db() function.
1 parent 905577a commit 477c214

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

docs/microbit_micropython_api.rst

+2
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ The Microphone is accessed via the `microphone` object::
108108
set_threshold(128)
109109
# Returns a representation of the sound pressure level in the range 0 to 255.
110110
sound_level()
111+
# Returns a representation of the sound pressure level in decibels (dB).
112+
sound_level_db()
111113

112114
Pins
113115
----

docs/microphone.rst

+4
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ Functions
9191

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

94+
.. py:function:: sound_level_db()
95+
96+
:return: A representation of the sound pressure level in decibels (dB)
97+
in the range of 52.0 to 110.0 dB.
9498

9599
Example
96100
=======

0 commit comments

Comments
 (0)