Skip to content
This repository has been archived by the owner on Dec 1, 2020. It is now read-only.

Keyboard Object

Tim edited this page Jan 27, 2017 · 3 revisions

Functions and constants included in the Chroma Keyboard object:

Initialize:

Keyboard = Chroma.Keyboard()

Functions:

setColor

sets the Keyboard-LED-Grid to one color.

Usage: setColor(Color)

Example:

Keyboard.setColor(RED) or Keyboard.setColor((255,0,0)) //RGB for RED

setbyCol

sets a specific column of keys of the Keyboard-LED-Grid to one color.

Usage: setbyCol(Column, Color)

Example:

Keyboard.setbyCol(3,RED) or Keyboard.setbyCol(3,(255,0,0)) //RGB for RED

setbyRow

sets a specific row of keys of the Keyboard-LED-Grid to one color.

Usage: setbyRow(Row, Color)

Example:

Keyboard.setbyRow(3,RED) or Keyboard.setbyRow(3,(255,0,0)) //RGB for RED

setbyGrid

sets a specific key of the Keyboard-LED-Grid to one color.

Usage: setbyGrid(X, Y, Color)

Example:

Keyboard.setbyGrid(3,4,RED) or Keyboard.setbyGrid(3,4,(255,0,0)) //RGB for RED

clearGrid

clears the Keyboard-LED-Grid.

Usage: clearGrid()

Example:

Keyboard.clearGrid()

applyGrid

applies the Keyboard-LED-Grid to the Keyboard.

Usage: applyGrid()

Example:

Keyboard.applyGrid()

setBreathing

sets the Keyboard to Breathing.

Usage: setBreathing(mode, Color1, Color2)

Mode: 1 - Two defined colors, 2 - random colors

Example:

Keyboard.setBreathing(1,RED,GREEN) or Keyboard.setBreathing(0,0,0)

setReactive

sets the Keyboard to Reactive.

Usage: setReactive(duration,Color)

Duration: 1 - short, 2 - medium, 3 -long

Example:

Keyboard.setReactive(1,RED)

setWave

sets the Keyboard to Wave.

Usage: setWave(direction)

Direction: 1 - left to right, 2 - right to left

Example:

Keyboard.setWave(1)

resetEffect

resets the current Chroma-Effect.

Usage: resetEffect()

Example:

Keyboard.resetEffect()

Constants:

MaxColumn

Maximum columns of the Keyboard-LED-Grid. Hint: Use this as iteration borders.

Example:

Keyboard.MaxColumn

MaxLED

Maximum LEDs of the Keyboard-LED-Grid. Hint: Use this as iteration borders.

Example:

Keyboard.MaxLED

MaxROW

Maximum rows of the Keyboard-LED-Grid. Hint: Use this as iteration borders.

Example:

Keyboard.MaxRow