Potentiometer

POTENTIOMETER is Generic variable resistance/potentiometer support interfaces.

Add Input Device

Item

Description

Potentiometer

Supports a potentiometer sensor.

The range of the sensor can be changed by the range() function.


CE products: from potentio import *

TI-Nspire CX II: from ti_hub import *

 

 

The function to create the object is pasted from the menu.

var=potentiometer("port")

Command:

var=potentiometer("port")

Command
Syntax:

var=potentiometer("port")

Range:

Describe:

Creates an object for the potentiometer sensor.

Result:

Type or
Addressable
Component:

Control

 

var.measurement()

Command:

var.measurement()

Command
Syntax:

var.measurement()

Python
Code
Sample:

TI Nspire CX II:

from ti_hub import *

p1 = potentiometer("IN 1")

r = p1.measurement()

print("Value is: ", m)

 

CE products:

from potentio import *

p1 = potentiometer("IN 1")

r = p1.measurement()

print("Value is: ", r)

Range:

Describe:

Returns the measured value of the potentiometer.

Result:

 

Type or
Addressable
Component:

Control

 

var.range(min,max)

Command:

var.range(min,max)

Command
Syntax:

var.range(min,max)

Range:

Describe:

Sets the range of returned values for the potentiometer. This needs to be called before the “var.measurement()” function for it to take effect.

Result:

Type or
Addressable
Component:

Control