Brightness sensor

This object is the interface to the brightness sensor on the TI-Innovator™ Hub.

It allows the program to read the value from the brightness sensor.

.

TI-Nspire CX II: from ti_hub import *

CE products: import brightns

 

 

 

brightness.measurement()

Command:

TI-Nspire CX II: brightness.measurement()

CE products: brightns.measurement()

Command Syntax:

brightness.measurement()

Range:

0 - 100

Describe:

Returns the current internal reading from the on-board ambient light sensor.

Example TI-Nspire CX II program:

from ti_hub import *

from time import *

while get_key() != "esc":

••b = brightness.measurement()

••print(b)

••sleep(1)

Result:

Read on-board light sensor level.

Type or
Addressable Component:

Control

 

brightness.range()

Command:

TI-Nspire CX II: brightness.range()

CE products: brightns.range()

Advanced user

Command Syntax:

brightness.range([min, max])

Range:

Describe:

Changes/Sets the mapping of ADC input values from the ADC 0- 16383 range to a user-selected range. The resulting sensor reading is mapped to this and a floating point result is returned. By default, the on-board BRIGHTNESS sensor is ranged to a 0-100 range.

Result:

Set mapping for on-board brightness/light sensor.

Type or
Addressable Component:

Sensor