Temperature
TEMPERATURE is the support for reading temperature sensors of various types.
Add Input Device
Item |
Description |
---|---|
Temperature |
Returns the temperature reading from the external temperature sensor. The default configuration is to support the Seeed temperature sensor in IN 1, IN 2 or IN 3 ports. To use the TI LM19 Temperature sensor from the TI-Innovator™ Hub breadboard pack, edit the port to the BB pin in use and use an optional argument "TIANALOG". Example: mylm19=temperature("BB 5","TIANALOG") |
CE products: from temperat import *
|
|
|
TI-Nspire CX II:from ti_hub import *
|
|
|
The function to create the object is pasted from the menu.
var=temperature("port")
Command: |
var=temperature("port") |
---|---|
Command Syntax: |
var=temperature("port") |
Range: |
|
Describe: |
Create an object for the temperature sensor attached to the “port”. |
Result: |
|
Type or |
Control |
var.measurement()
Command: |
var.measurement() |
---|---|
Command Syntax: |
var.measurement() |
Code |
TI Nspire CX II: from ti_hub import * t1 = temperature("IN 1") temp = t1.measurement() print("Temp is: ", temp) |
|
CE products: from temperat import * t1 = temperature("IN 1") temp = t1.measurement() print("Temp is: ", temp) |
Range: |
|
Describe: |
Returns the temperature value measured by the sensor. |
Result: |
|
Type or |
Control |