Connecting the wixel to the shiftbrite chain, Using the shiftbrite app, Parameters – Pololu Wixel User Manual

Page 52: Data format

Advertising
background image

Connecting the Wixel to the ShiftBrite chain

The following connections should be made between the Wixel running the ShiftBrite App and the first ShiftBrite in
the chain:

Wixel ShiftBrite Function

P1_4

EI

Enable

P1_5

CI

Clock

P1_6

DI

Data

P1_7

LI

Latch

GND

GND

Ground

Additionally, the Wixel and ShiftBrites may share the same VIN as long as the voltage requirements for both modules
are satisfied. For initial testing, you may alternatively use VALT to power the ShiftBrites from USB (see

Section 5.a

).

Using the ShiftBrite App

After making the correct connections and applying power, open a terminal program and connect to the COM port
created by the Wixel running the Wireless Serial App. Type

ffffff

. As you type the characters, they will be echoed

back to your terminal. Press Enter, and the first ShiftBrite in your chain will light up in white. Then type

ff0000

and

press Enter; now the first ShiftBrite should be red, and the second should be white (if present).

To shift out multiple color commands at once, for example when you want to set the colors of the entire chain, type a
series of single-color commands without pressing Enter, then press Enter once to apply them all.

Parameters

radio_channel: The channel number is from 0 to 255 and determines which frequency to broadcast on. The
default is 128. Wixels must be on the same channel to communicate with each other. To avoid interference,
Wixels that aren’t supposed to talk to each other should be at least 2 channels away from each other. For example,
you could have one pair of Wixels on channel 128 and another pair on 130.

input_bits: The number of bits per channel that you would like to use to send color information. The allowed
values are 1 to 16, and the default is 8, which corresponds to colors represented by 6-digit hex values. However,
the ShiftBrite supports 10 bits of resolution, so choose a value of 10 to make use of its full dynamic range. In this
case, you must send 9 digits to set a color. For example,

3ff3ff3ff

is the brightest possible white and

001000000

is the dimmest possible red. Other values for this parameter might be useful in special situations (e.g. 4 bits of
resolution lets you specify a full color in three bytes, such as

f00

for red, which allows for a higher update rate).

echo_on: Set to 0 to disable echoing of every character sent. While echoes are useful for debugging, you
might want to disable them for the highest possible speed.

Data Format

The data consists of a series of red, green, and blue (RGB) values, as ASCII hex strings. Each value contains from 1
to 4 characters, depending on the value of input_bits, specifying a number from 0 to 2

input_bits

-1. When a complete

set of R, G, and B values has been received, the values are multiplied or divided by the appropriate factor to match
the 10-bit ShiftBrite data format and shifted out to the ShiftBrite chain. An Enter character (ASCII 10 or 13) causes
the Latch pin to be toggled, instantly setting each ShiftBrite to its new color.

Pololu Wixel User's Guide

© 2001–2014 Pololu Corporation

9. Wixel Apps

Page 52 of 64

Advertising