TI-RGB Array

TI-RGB Array control interfaces for programming the TI-RGB Array with a variety of easy to difficult operations.

Add Input Device

Item

Description

TI-RGB Array

Provides functions for programming the TI-RGB Array.

The initialization function accepts an optional "LAMP" parameter to enable a high-brightness mode for the TI-RGB Array that requires an external power supply.

set(led_position, r,g,b): Sets a specific led_position (0-15) to the specified r,g,b value, where r,g,b are values from 0 to 255.
set_all(r,g,b): Sets all RGB LEDs in the array to the same r,g,b value.
all_off(): Turns off all RGBs in the array.
measurement(): Returns the approximate current draw that the RGB array is using from the TI-Innovator™ in milliAmps.
pattern(pattern): Using the value of the argument as a binary value in the range 0 to 65535, turns on pixels where a 1 value in the representation would be. LEDs are turned on as RED with pwm level value of 255.

Add Output Device

Item

Description

TI-RGB Array

Provides functions for programming the TI-RGB Array.


CE products: from rgb_arr import *

TI-Nspire CX II: from ti_hub import *

 

 

The function to create the object is pasted from the menu.

var=rgb_array()

Command:

var=rgb_array()

Command
Syntax:

var=rgb_array()

Python
Code
Sample:

TI Nspire CX II:

from ti_hub import *

r1 = rgb_array()

r1.set_all(255,0,0)

c_red = r1.measurement()

r1.set_all(255,255,255)

c_white = r1.measurement()

print("Red LEDs current: ", c_red, "White LEDs current: ", c_white)

 

CE products:

from rgb_arr import *

r1 = rgb_array()

r1.set_all(255,0,0)

c_red = r1.measurement()

r1.set_all(255,255,255)

c_white = r1.measurement()

print("Red LEDs current: ", c_red, "White LEDs current: ", c_white)

Range:

Describe:

Creates an object for the TI-RGB Array.

The initialization includes verification that the TI-RGB Array is connected to the TI-Innovator™ Hub.

Note that TI-RGB Array is both an input and an output device. It is included in both menus.

An optional parameter (“lamp”) requires the presence of an external battery to increase the brightness of the LEDs.

Result:

Type or
Addressable
Component:

Control

 

var.set(led_position, red, green, blue)

Command:

var.set(led_position, red, green, blue)

Command
Syntax:

var.set(led_position, red, green, blue)

Range:

Describe:

Sets a specific led_position (0-15) to the specified r, g, b value, where r,g,b are values from 0 to 255.

Result:

Type or
Addressable
Component:

Control

 

var.set_all(red, green, blue)

Command:

var.set_all(red, green, blue)

Command
Syntax:

var.set_all(red, green, blue)

Range:

Describe:

Sets all RGB LEDs in the array to the same r,g,b value.

Result:

Type or
Addressable
Component:

Control

 

var.all_off()

Command:

var.all_off()

Command
Syntax:

var.all_off()

Range:

 

Describe:

Turns off all RGB LEDs in the array.

Result:

Type or
Addressable
Component:

Control

 

var.pattern(value)

Command:

var.pattern(value)

Command
Syntax:

var.pattern(value)

Range:

Describe:

Using the value of the argument as a binary value in the range 0 to 65535, turns on pixels where a 1 value in the representation would be.

LEDs are turned on as RED.

Example: a value of 201 which is 0b 1100 1001 in binary would turn ON LEDs 0, 3, 6 7

Result:

Type or
Addressable
Component:

Control

 

var.measurement()

Command:

var.measurement()

Command
Syntax:

var.measurement()

Range:

Describe:

Returns the approximate current draw that the RGB array is using from the TI-Innovator in milliAmps.

Result:

Type or
Addressable
Component:

Control