Vibration Motor

VIBRATION MOTOR control interfaces for running vibration motors.

Add Output Device

Item

Description

Vibration Motor

Functions for controlling vibration motors.

set(val): Sets the vibration motor intensity to "val" (0-255).
off(): Turns the vibration motor off.
on(): Turns the vibration motor on at the highest level.

CE products: from vibmotor import *

TI-Nspire CX II: from ti_hub import *

 

 

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

var=vibration_motor("OUT 3")

Command:

var=vibration_motor("OUT 3")

Command
Syntax:

var=vibration_motor("OUT 3")

Range:

Describe:

Creates an object for a vibration 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(value)

Command:

var.set(value)

Command
Syntax:

var.set(value)

Python
Code
Sample:

TI Nspire CX II:

from ti_hub import *

from time import *

 

vm1=vibration_motor("OUT 3")

vm1.set(127)

sleep(5)

vm1.off()

 

CE products:

from vibmotor import *

from time import *

 

vm1=vibration_motor("OUT 3")

vm1.set(127)

sleep(5)

vm1.off()

Range:

Describe:

Turns on the vibration motor to the power specified by “value”. Value is from 0 to 255.

Result:

 

Type or
Addressable
Component:

Control

 

var.off()

Command:

var.off()

Command
Syntax:

var.off()

Range:

Describe:

Turns off the vibration motor.

Result:

Type or
Addressable
Component:

Control

 

var.on()

Command:

var.on()

Command
Syntax:

var.on()

Range:

Describe:

Turns on the vibration motor to the highest level.

Result:

Type or
Addressable
Component:

Control