Servo

SERVO the Sweep Servo motor control interfaces.

Add Output Device

Item

Description

Servo

Functions for controlling servo motors.

set_position(pos): Sets the sweep servo position within a range of -90 to +90.
zero(): Sets the sweep servo to the zero position.

CE products: from servo import *

TI-Nspire CX II: from ti_hub import *

 

 

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

var=servo("OUT 3")

Command:

var=servo("OUT 3")

Command
Syntax:

var=servo("OUT 3")

Python
Code
Sample:

TI Nspire CX II:

from ti_hub import *

from time import *

servo1=servo("OUT 3")

 

servo1.zero()

sleep(2)

servo1.set_position(45)

 

CE products:

from servo import *

from time import *

servo1=servo("OUT 3")

 

servo1.zero()

sleep(2)

servo1.set_position(45)

Range:

Describe:

Creates an object for a sweep servo motor.

The port is limited to OUT 3 because a servo motor needs 5V to operate that is only available on OUT 3.

Result:

 

Type or
Addressable
Component:

Control

 

var.set_position(pos)

Command:

var.set_position(pos)

Command
Syntax:

var.set_position(pos)

Range:

Describe:

Sets the sweep servo position within a range of -90 to +90, with the pos rounded to the nearest tenth.

Result:

Type or
Addressable
Component:

Control

 

var.zero()

Command:

var.zero()

Command
Syntax:

var.zero()

Range:

Describe:

Sets the sweep servo to the zero position.

Result:

Type or
Addressable
Component:

Control