Exemplo n.º 1
0
import ChromaPy32 as Chroma  # Import the Chroma Module
from time import sleep  # Import the sleep-function

Keypad = Chroma.Keypad()

Keypad.setWave(0)  # sets the Keypad to Wave from left to right
sleep(5)

Keypad.resetEffect()  # resets the current Chroma Effect

sleep(5)

Keypad.setColor((255, 0, 0))  # sets new color the the Keypad
Keypad.applyGrid()
sleep(5)
Exemplo n.º 2
0
import ChromaPy32 as Chroma  # Import the Chroma Module
from time import sleep

Mouse = Chroma.Mouse()  # Initialize a new Mouse Instance

RED = (255, 0, 0)  # Initialize a new color by RGB (RED,GREEN,BLUE)

Mouse.setColor(RED)  # sets the whole Mouse-Grid to RED

Mouse.applyGrid()  # applies the Mouse-Grid to the connected Mouse

sleep(5)
Exemplo n.º 3
0
import ChromaPy32 as Chroma  # Import the Chroma Module
from time import sleep  # Import the sleep-function

Keyboard = Chroma.Keyboard()

RED = (255, 0, 0)

Keyboard.setReactive(1,
                     RED)  # sets the Keyboard to Reactive with short duration
sleep(10)
Keyboard.setReactive(2,
                     RED)  # sets the Keyboard to Reactive with medium duration
sleep(10)
Keyboard.setReactive(3,
                     RED)  # sets the Keyboard to Reactive with long duration
sleep(10)
Exemplo n.º 4
0
import ChromaPy32 as Chroma  # Import the Chroma Module
from time import sleep

Keyboard = Chroma.Keyboard()  # Initialize a new Keyboard Instance

RED = (255, 0, 0)  # Initialize a new color by RGB (RED,GREEN,BLUE)

Keyboard.setbyGrid(
    1, 0, RED
)  # sets the ESC-Key to RED. More information about the Grid are on the official website

Keyboard.applyGrid()  # applies the Keyboard-Grid to the connected Keyboard
sleep(5)

Keyboard.clearGrid()  # clears the Grid
Keyboard.applyGrid()  # applies the cleared Grid to the connected Keyboard

sleep(5)
Exemplo n.º 5
0
import ChromaPy32 as Chroma  # Import the Chroma Module
from time import sleep

Keypad = Chroma.Keypad()  # Initialize a new Keypad Instance

RED = (255, 0, 0)  # Initialize a new color by RGB (RED,GREEN,BLUE)
GREEN = (0, 255, 0)

for y in range(0, Keypad.MaxRow):  # Use Keypad.MaxRow as an iteration border in a for-loop
    Keypad.setbyGrid(y, 3, RED)  # sets the whole fourth column to green

for x in range(0, Keypad.MaxColumn):  # Use Keypad.MaxColumn as iteration border in a for-loop
    Keypad.setbyGrid(x, 2, GREEN)  # sets the whole third row to green

Keypad.applyGrid()  # applies the Keypad-Grid to the connected Keypad
sleep(5)
Exemplo n.º 6
0
import ChromaPy32 as Chroma  # Import the Chroma Module
from time import sleep  # Import the sleep-function

Mousepad = Chroma.Mousepad()

Mousepad.setWave(1)  # sets the Keypad to Wave from left to right
sleep(10)
Mousepad.setWave(2)  # sets the Keypad to Wave from right to left
sleep(10)
Exemplo n.º 7
0
import ChromaPy32 as Chroma  # Headset the Chroma Module
from time import sleep

Headset = Chroma.Headset()  # Initialize a new Headset Instance

RED = (255, 0, 0)  # Initialize a new color by RGB (RED,GREEN,BLUE)

for led in range(0, Headset.MaxLED
                 ):  # Use Headset.MaxLED as an iteration border in a for-loop
    Headset.setbyLED(led, RED)  # sets all LED to red

Headset.applyLED()  # applies the Headset-Grid to the connected Headset

sleep(5)
Exemplo n.º 8
0
import ChromaPy32 as Chroma  # Import the Chroma Module
from time import sleep  # Import the sleep-function

Mouse = Chroma.Mouse()

RED = (255, 0, 0)
GREEN = (0, 255, 0)

Mouse.setBreathing(1, RED, GREEN)  # sets the Keypad to Breathing with red
sleep(10)
Mouse.setBreathing(0, 0, 0)  # sets the Keypad to Breathing with random colors
sleep(10)
Exemplo n.º 9
0
import ChromaPy32 as Chroma  # Import the Chroma Module
from time import sleep  # Import the sleep-function

Mousepad = Chroma.Mousepad()  # Initialize a new Mousepad Instance

RED = (255, 0, 0)  # Initialize a new color by RGB (RED,GREEN,BLUE)

for x in range(
        0,
        Mousepad.MaxLED):  # for-loop with Mousepad.MaxLED as iteration border
    Mousepad.setbyLED(x, RED)  # set the x-th led to red
    Mousepad.applyLED()  # applies the Mousepad-Grid to the connected Mousepad
    sleep(0.1)  # sleeps 100ms until next row will be filled