Skip to content

CSD-03 Rotary Pot ​

Instance declaration ​

When you add a CSD-03 Rotary Pot block to the workspace, the following instance declaration is automatically inserted into the Python code:

python
cheesestick = CheeseStick(0)
csd03 = cheesestick.CSD03()

Parameters ​

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

Set the input port ​

Sets the port that CSD03 (a potentiometer) is connected to.

set_input_port

Parameters ​

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

Python ​

python
cheesestick = CheeseStick(0)
csd03 = cheesestick.CSD03()

csd03.set_port('Sa')

Set the input range ​

Converts the input value of the selected port to the minimum~maximum range you specify.
The range of the input value is 0 to 255.
The range of values it can be converted to is -100 to 100.

set_input_range

Parameters ​

NameKindDescriptionRange / TypeDefault
unitDropdown optionTarget portSa, Sb, Sc-
src_minInput (field)Source minimumInteger 0 to 255-
src_maxInput (field)Source maximumInteger 0 to 255-
dst_minInput (field)Minimum after conversionInteger -100 to 100-
dst_maxInput (field)Maximum after conversionInteger -100 to 100-

Python ​

python
cheesestick = CheeseStick(0)
csd03 = cheesestick.CSD03()

csd03.set_input_range('Sa', 0, 255, 0, 100)

Set the input range with a median ​

Converts the input value of the selected port to the minimum~median~maximum range you specify.
The range of the input value is 0 to 255.
The range of values it can be converted to is -100 to 100.

set_input_range_median

Parameters ​

NameKindDescriptionRange / TypeDefault
unitDropdown optionTarget portSa, Sb, Sc-
src_minInput (field)Source minimumInteger 0 to 255-
src_medianInput (field)Source medianInteger 0 to 255-
src_maxInput (field)Source maximumInteger 0 to 255-
dst_minInput (field)Minimum after conversionInteger -100 to 100-
dst_medianInput (field)Median after conversionInteger -100 to 100-
dst_maxInput (field)Maximum after conversionInteger -100 to 100-

Python ​

python
cheesestick = CheeseStick(0)
csd03 = cheesestick.CSD03()

csd03.set_input_range_median('Sa', 0, 128, 255, -100, 0, 100)

Input value ​

The rotary potentiometer input value of the selected port
If you have not set an input range separately, the range of the input value is 0 to 255.

get_input

Parameters ​

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

Python ​

python
cheesestick = CheeseStick(0)
csd03 = cheesestick.CSD03()

csd03.get_input('Sa')