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:

temperature - Stainless Steel Temperature sensor.
lightlevel - TI Light level sensor.
pressure - Original gas pressure sensor
pressure - Newer gas pressure sensor.
pH - pH sensor.
force10 - ±10 N setting, Dual Force Sensor.
force50 - ±50 N setting, Dual Force Sensor.
accelerometer - Low-G Accelerometer.
generic - Allows setting of other sensors not supported directly above, and use of the calibrate() API above to set equation coefficients.

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
Syntax:

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:

Stainless Steel Temperature Probe (“temperature”)
pH Sensor (“pH”)
Gas Pressure Sensor (“pressure” and “pressure2”)
Dual-Range Force Sensor (“force10” and “force50”)
Light Sensor (“lightlevel”)
Low-g Accelerometer (“accelerometer”)

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
Addressable
Component:

Control

 

var.measurement()

Command:

var.measurement()

Command
Syntax:

var.measurement()

Python
Code
Sample:

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
Addressable
Component:

Control

 

var.calibrate(a,b)

Command:

var.calibrate(a,b)

Command
Syntax:

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
Addressable
Component:

Control

 

var.calibrate(a,b,c,r)

Command:

var.calibrate(a,b,c,r)

Command
Syntax:

var.calibrate(a,b,c,r)

Range:

Describe:

This function is needed to calibrate thermistor style Steinhart sensors.

Result:

Type or
Addressable
Component:

Control