From 9e9ea1c36d39dacdae34db088b7ebd401e68d4ee Mon Sep 17 00:00:00 2001 From: Carlos Pereira Atencio Date: Thu, 21 Mar 2024 12:13:45 +0000 Subject: [PATCH] docs: Add microphone.sound_level_db() function. --- docs/microbit_micropython_api.rst | 2 ++ docs/microphone.rst | 3 +++ 2 files changed, 5 insertions(+) diff --git a/docs/microbit_micropython_api.rst b/docs/microbit_micropython_api.rst index 19362fdac..93c2400b7 100644 --- a/docs/microbit_micropython_api.rst +++ b/docs/microbit_micropython_api.rst @@ -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 ---- diff --git a/docs/microphone.rst b/docs/microphone.rst index 88a847031..1cc241935 100644 --- a/docs/microphone.rst +++ b/docs/microphone.rst @@ -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 =======