Blinks is built on top of Arduino, a simplified C++ for hardware. Is this your first time programming with Arduino? Here's a great Language Reference. The following functions are what you will use for Blinks, but the Variables and Structure are borrowed from Arduino.

Display Functions

setColor()

setColorOnFace()

Color Functions

makeColorRGB()

makeColorHSB()

dim()

Defined Colors

Button Functions

buttonPressed()

buttonReleased()

buttonSingleClicked()

buttonDoubleClicked()

buttonMultiClicked()

buttonClickCount()

buttonLongPressed()

buttonDown()

Communication Functions

setValueSentOnAllFaces()

setValueSentOnFace()

getLastValueReceivedOnFace()

isValueReceivedOnFaceExpired()

didValueOnFaceChange()

isAlone()

Datagram Functions

getDatagramLengthOnFace()

isDatagramReadyOnFace()

getDatagramOnFace()

markDatagramReadOnFace()

sendDatagramOnFace()

Time Functions

Timer.set()

Timer.isExpired()

Timer.getRemaining()

Timer.never()

New Types

Color

Timer

Convenience Functions

FOREACH_FACE(f)

COUNT_OF(array)

FACE_COUNT

Uniqueness

uint16_t random (uint16t_limit)

random()

randomize()

getSerialNumberByte()

Math

map()

sin8_C()

Display

setColor()

Description

Displays a color on the entire Blink.

Syntax setColor(COLOR);

Parameters COLOR: a color, either from Defined Colors or one you define with a Color function.

Returns Displays a color on the entire Blink.

Example Code

void setup() {

// sets the color of the Blink to blue
setColor(BLUE);

}

Notes & WarningsPlease note that setColor() commands do not actually update the color on the LEDs until loop() returns.

Back to top

setColorOnFace()

Description Displays a color on a single face of a Blink.

Syntax setColorOnFace(COLOR, face number);

Parameters COLOR: a color, either from Defined Colors or one you define with a Color function.

Face Number: a pixel on a Blink. Can be from (0-5) faces.

Returns Displays a color on a certain face on the Blink.

Example Code

void setup() {

// sets the color to be white on face 0
setColorOnFace(WHITE, 0);

}