mirror of
https://github.com/pybricks/pybricks-api.git
synced 2026-09-15 11:04:55 +00:00
api/nxtdevices: add Sound Sensor
This commit is contained in:
@@ -43,3 +43,6 @@ NXT Ultrasonic Sensor
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
.. autoclass:: pybricks.nxtdevices.UltrasonicSensor
|
||||
|
||||
NXT Sound Sensor
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
.. autoclass:: pybricks.nxtdevices.SoundSensor
|
||||
|
||||
@@ -120,3 +120,30 @@ class UltrasonicSensor():
|
||||
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
class SoundSensor():
|
||||
"""LEGO® MINDSTORMS® NXT Sound Sensor."""
|
||||
|
||||
def __init__(self, port):
|
||||
"""
|
||||
|
||||
Arguments:
|
||||
port (Port): Port to which the sensor is connected.
|
||||
|
||||
"""
|
||||
pass
|
||||
|
||||
def intensity(self, audible=True):
|
||||
"""Measure the ambient sound intensity (loudness).
|
||||
|
||||
Arguments:
|
||||
audible (bool): Detect only audible sounds. This tries to
|
||||
filter out frequencies that cannot be heard by the
|
||||
human ear. (*Default*: True).
|
||||
|
||||
Returns:
|
||||
:ref:`percentage`: Sound intensity.
|
||||
|
||||
"""
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user