Continuous Servo

CONTINUOUS SERVO provides the interfaces for controlling a continuous servo motor.

Add Output Device

Item

Description

Continuous
Servo

Functions for controlling continuous servo motors.

set_cw(speed,time): The servo will spin in the clockwise direction at the specified speed (0-255) and for the specific duration in seconds.
set_ccw(speed,time): The servo will spin in the counter-clockwise direction at the specified speed (0-255) and for the specific duration in seconds.
stop(): Stops the continuous servo.

CE products: from conservo import *

TI-Nspire CX II: from ti_hub import *

 

 

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

var=continuous_servo("OUT 3")

Command:

var=continuous_servo("OUT 3")

Command
Syntax:

var=continuous_servo("OUT 3")

Python
Code
Sample:

TI Nspire CX II:

from ti_hub import *

from time import *

 

cs1=continuous_servo("OUT 3")

 

cs1.set_cw(100,5)

sleep(5)

cs1.set_ccw(100,5)

 

CE products:

from conservo import *

from time import *

 

cs1=continuous_servo("OUT 3")

 

cs1.set_cw(100,5)

sleep(5)

cs1.set_ccw(100,5)

Range:

Describe:

Creates an object for a continuous 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_cw(speed,time)

Command:

var.set_cw(speed,time)

Command
Syntax:

var.set_cw(speed,time)

Range:

Describe:

Turn the motor clockwise at the specified “speed” (0 – 100) for the specified time in seconds.

Result:

Type or
Addressable
Component:

Control

 

var.set_ccw(speed,time)

Command:

var.set_ccw(speed,time)

Command
Syntax:

var.set_ccw(speed,time)

Range:

Describe:

Turn the motor counter-clockwise at the specified “speed” (0 – 100) for the specified time in seconds.

Result:

Type or
Addressable
Component:

Control

 

var.stop()

Command:

var.stop()

Command
Syntax:

var.stop()

Range:

Describe:

Stops the motor.

Result:

Type or
Addressable
Component:

Control