Skip to content

CSD-07 Sound Sensor ​

Instance declaration ​

When you add a CSD-07 Sound Sensor block to the workspace, the following instance declaration is automatically inserted into the Python code:

python
cheesestick = CheeseStick(0)
csd07 = cheesestick.CSD07()

Parameters ​

NameKindDescriptionRange / TypeDefault
indexDropdown optionInstance number (starting from 0)Integer 0 or greater0

Set the input port ​

Sets the port that CSD07 (a sound sensor) is connected to.

set_input_port

Parameters ​

NameKindDescriptionRange / TypeDefault
unitDropdown optionPort to connect toSa, Sb, Sc-

Python ​

python
cheesestick = CheeseStick(0)
csd07 = cheesestick.CSD07()

csd07.set_port('Sa')

Sound sensor value ​

The sound sensor value of the selected port

get_input

Parameters ​

NameKindDescriptionRange / TypeDefault
unitDropdown optionPort to read fromSa, Sb, ScThe port of the last set_port

Python ​

python
cheesestick = CheeseStick(0)
csd07 = cheesestick.CSD07()

csd07.get_input('Sa')