Vernier (used with TI-SensorLink)
The “vernier” object is used with the TI Sensor Link adapter to collected data from Vernier sensors.
VERNIER support interfaces to allow setting up and reading Vernier analog sensors via a TI-SensorLink.
Add Input Device
Item |
Description |
|||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Vernier |
Reads the value from the Vernier analog sensor specified in the command. The command supports the following Vernier sensors:
|
CE products: from vernier import *
TI-Nspire CX II:from ti_hub import *
|
|
|
The function to create the object is pasted from the menu.
var=vernier("port","type")
Command: |
var=vernier("port","type") |
||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Command |
var=vernier("port","type") |
||||||||||||||||||
Range: |
|
||||||||||||||||||
Describe: |
This function creates the “vernier” object to represent the sensor specified by “type” connected to “port”. The supported Vernier sensors are:
For all of these sensors, the “var.measurement()” function returns the calibrated sensor value.
A generic Vernier sensor is also supported. This can be used to get sensor data from a Vernier analog sensor that’s not in the list above. The sensor object will need to be calibrated with the right coefficients to get the appropriate value. In the absence of explicit calibration, the “var.measurement()” function will return a raw voltage value between 0 and 16383. |
||||||||||||||||||
Result: |
|
||||||||||||||||||
Type or |
Control |
var.measurement()
Command: |
var.measurement() |
---|---|
Command |
var.measurement() |
Python |
TI Nspire CX II: from ti_hub import * v1 = vernier("IN 2", "pH") pHval = v1.measurement() print("pH is: ", pHval) |
|
CE products: from vernier import * v1 = vernier("IN 2", "pH") pHval = v1.measurement() print("pH is: ", pHval) |
Range: |
|
Describe: |
Returns the sensor data. |
Result: |
|
Type or |
Control |
var.calibrate(a,b)
Command: |
var.calibrate(a,b) |
---|---|
Command |
var.calibrate(a,b) |
Range: |
|
Describe: |
This function will be needed for a “generic” Vernier sensor that’s not in the list above. It calibrates linear ax+b sensors. |
Result: |
|
Type or |
Control |
var.calibrate(a,b,c,r)
Command: |
var.calibrate(a,b,c,r) |
---|---|
Command |
var.calibrate(a,b,c,r) |
Range: |
|
Describe: |
This function is needed to calibrate thermistor style Steinhart sensors. |
Result: |
|
Type or |
Control |