Analog Out
ANALOG.OUT supports a software generated pulse-width modulation output with variable duty cycle.
Add Output Device
Item |
Description |
---|---|
Analog Out |
Functions for the use of analog output generic devices. |
CE products: from analogout import *
TI-Nspire CX II: from ti_hub import *
|
|
|
The function to create the object is pasted from the menu.
var=analog_out ("port")
Command: |
var=analog_out ("port") |
---|---|
Command |
var=analog_out ("port") |
Range: |
|
Describe: |
Creates an object for an analog output device connected to the "port". |
Result: |
|
Type or |
Control |
var.set(value)
Command: |
var.set(value) |
---|---|
Command Syntax: |
var.set(value) |
Python |
TI Nspire CX II: from ti_hub import *
a1=analog_out("BB 5") a1.set(127) |
|
CE products: from analgout import *
a1=analog_out("BB 5") a1.set(127) |
Range: |
|
Describe: |
Sets the output PWM (pulse width modulated) value for the analog_out object specified. Value is from 0 to 255. |
Result: |
|
Type or |
Control |
var.off()
Command: |
var.off() |
---|---|
Command |
var.off() |
Range: |
|
Describe: |
Sets the output PWM value to zero, driving the output pin to digital low level. Equivalent to "var.set(0)”. |
Result: |
|
Type or |
Control |
var.on()
Command: |
var.on() |
---|---|
Command |
var.on() |
Range: |
|
Describe: |
Sets the output PWM value to 255, which results in a digital high signal being continuously output. Equivalent to "var.set(255)". |
Result: |
|
Type or |
Control |