New Commands to use with TI-RGB Array

Using the RGB Array

What is TI-RGB Array?

TI-RGB Array is an accessory to TI-Innovator™ Hub.

TI-RGB Array has 16 programmable RGB LEDs.

Multiple applications

Smart greenhouse
Binary counter
STEAM projects
Coding lessons


Software Commands

The name of the array is RGB.

Note: The name of the on-board RGB LED is COLOR.


Connecting the TI-RGB Array

Steps

1. Connect one end of the provided cable to the TI-RGB Array port labeled:

2. Connect the corresponding wires to the usable pins on the Hub labeled:

Red: 5V - power

Blue : BB5 - analog out

Yellow: BB2 - SPI signal

Black: GND - ground


Controlling each element

The individual LED is indicated by its number on the board.

Examples:

Code
Samples:

Send "CONNECT RGB"

 

Code
Samples:

Send "SET RGB n r g b"

 

Send "SET RGB 8 200 0 255"

 

Send "SET RGB eval(N) 200 0 200"

 

Send "SET RGB eval(N) eval(R) eval(G) eval(B)"

 

Send "SET RGB eval(N) ON ON OFF" – equivalent to Send "SET RGB eval(N) 255 255 0"

The individual LEDs are numbered 0 through 15.

Any values outside this range will be treated as an error.


Control all LEDs in a single command

To control all the LEDs in a single command use: SET RGB ALL r g b

Examples:

Code
Sample:

SET RGB ALL 255 0 255

 

SET RGB ALL 255 0 0

 

SET RGB ALL eval(R) eval(G) eval(B)

 

SET RGB ALL 0 0 0

 


CONNECT RGB AS LAMP

This command will enable the “high brightness” mode of the TI-RGB Array as long as an external power source (like the USB battery) is connected to the PWR port.

Note: “AS LAMP” will need to be typed in.

The way to enable this mode is to use:

Code
Sample:

Send "CONNECT RGB AS LAMP"

The TI-RGB Array is now configured to be in high-brightness mode.

Note: If the external power is not connected, the "AS LAMP" has no effect – i.e. the brightness will be at the default level. Also note, an error will be indicated by a beep tone.


Intensity control

The brightness of the LEDs can be controlled by scaling the r, g, b values.

For example:

SET RGB 8 10 10 10 and SET RGB 8 255 255 255 will both generate white at differing brightness.


READ RGB

READ RGB returns the value of the current consumed by the array in mA.

Code
Sample:

Send “READ RGB”

Get current

Disp current


The single, individual RGB LED can still be used with the original syntax

CONNECT RGB 1 BB 8 BB 9 BB 10


See Also: TI-RGB Array Setup Guide