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

Keypad Object

Tim edited this page Jan 27, 2017 · 2 revisions

Functions and constants included in the Chroma Keypad object:

Initialize:

Keypad = Chroma.Keypad()

Functions:

setColor

sets the Keypad-LED-Grid to one color.

Usage: setColor(Color)

Example:

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

setbyCol

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

Usage: setbyCol(Column, Color)

Example:

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

setbyRow

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

Usage: setbyRow(Row, Color)

Example:

Keypad.setbyRow(3,RED) or Keypad.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:

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

clearGrid

clears the Keypad-LED-Grid.

Usage: clearGrid()

Example:

Keypad.clearGrid()

applyGrid

applies the Keypad-LED-Grid to the Keyboard.

Usage: applyGrid()

Example:

Keypad.applyGrid()

setBreathing

sets the Keypad to Breathing.

Usage: setBreathing(Color)

Example:

Keypad.setBreathing(GREEN)

setReactive

sets the Keypad to Reactive.

Usage: setReactive(duration,Color)

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

Example:

Keypad.setReactive(1,RED)

setWave

sets the Keypad to Wave.

Usage: setWave(direction)

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

Example:

Keypad.setWave(1)

resetEffect

resets the current Chroma-Effect.

Usage: resetEffect()

Example:

Keypad.resetEffect()

Constants:

MaxColumn

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

Example:

Keypad.MaxColumn

MaxLED

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

Example:

Keypad.MaxLED

MaxROW

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

Example:

Keypad.MaxRow

Clone this wiki locally