Relay

RELAY control interfaces for dealing with relays.

Add Output Device

Item

Description

Relay

Controls interfaces for controlling relays.

on(): Sets the relay to the ON state.
off(): Sets the relay to the OFF state.

CE products: from relay import *

TI-Nspire CX II: from ti_hub import *

 

 

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

var=relay("OUT 3")

Command:

var=relay("OUT 3")

Command
Syntax:

var=relay("OUT 3")

Python
Code
Sample:

TI Nspire CX II:

from ti_hub import *

from time import *

 

r1=relay("OUT 3")

 

r1.on()

sleep(5)

rl.off()

 

CE products:

from relay import *

from time import *

 

r1=relay("OUT 3")

 

r1.on()

sleep(5)

rl.off()

Range:

Describe:

Creates an object for a relay

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

Result:

 

Type or
Addressable
Component:

Control

 

var.off()

Command:

var.off()

Command
Syntax:

var.off()

Range:

Describe:

Turns off the relay.

Result:

Type or
Addressable
Component:

Control

 

var.on()

Command:

var.on()

Command
Syntax:

var.on()

Range:

Describe:

Turns on the relay.

Result:

Type or
Addressable
Component:

Control