All Projects → stevelacy → Msi Keyboard

stevelacy / Msi Keyboard

Licence: mit
MSI SteelSeries Keyboard LED Controller

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Msi Keyboard

cyclops
Precision current source, with optional optical feedback, for driving LEDs and laser diodes
Stars: ✭ 38 (-86.62%)
Mutual labels:  hardware, led
Pulsesensorstarterproject
The Best Way to Get Started with your PulseSensor and Arduino
Stars: ✭ 38 (-86.62%)
Mutual labels:  hardware, led
Upboard ros
ROS nodes for upboard usage
Stars: ✭ 22 (-92.25%)
Mutual labels:  hardware, led
uchroma
An advanced driver for Razer Chroma hardware in Linux
Stars: ✭ 45 (-84.15%)
Mutual labels:  hardware, led
input-event
🎹 Read and parse input device(like mouse, keyboard, joystick and IR-Remote)'s event data.
Stars: ✭ 45 (-84.15%)
Mutual labels:  hardware
MinimumViableSynth
A virtual analog synthesizer with lots of knobs and buttons.
Stars: ✭ 22 (-92.25%)
Mutual labels:  hardware
govee btled
A Python wrapper for controlling a cheap Bluetooth RGB light bulb.
Stars: ✭ 50 (-82.39%)
Mutual labels:  led
docker
Scripts to build and use docker images including GHDL
Stars: ✭ 27 (-90.49%)
Mutual labels:  hardware
Castor and pollux
A Juno-inspired dual oscillator
Stars: ✭ 279 (-1.76%)
Mutual labels:  hardware
Node Feature Discovery
Node feature discovery for Kubernetes
Stars: ✭ 270 (-4.93%)
Mutual labels:  hardware
ioBroker.wled
IoBroker integration to WLED project
Stars: ✭ 22 (-92.25%)
Mutual labels:  led
super-sixteen
Code and schematics for the Super Sixteen Eurorack sequencer
Stars: ✭ 90 (-68.31%)
Mutual labels:  hardware
sweetbit
🔌 Sweet daemon for pairing and control of the Bitcoin-enabled candy dispenser
Stars: ✭ 48 (-83.1%)
Mutual labels:  hardware
pioreactor
Hardware and software for accessible, extensible, and scalable bioreactors. Built on Raspberry Pi.
Stars: ✭ 28 (-90.14%)
Mutual labels:  hardware
Ottodiyesp
build you own internet of robots!
Stars: ✭ 273 (-3.87%)
Mutual labels:  hardware
pearlfan
GNU/Linux kernel driver and libusb app for a Pearl's USB LED fan
Stars: ✭ 20 (-92.96%)
Mutual labels:  led
MGS.Electronics
Unity plugin for make button switch, knob switch and rocker element in scene.
Stars: ✭ 12 (-95.77%)
Mutual labels:  led
Pyverilog
Python-based Hardware Design Processing Toolkit for Verilog HDL
Stars: ✭ 267 (-5.99%)
Mutual labels:  hardware
streamdeck
Golang API for the Corsair / Elgato StreamDeck
Stars: ✭ 46 (-83.8%)
Mutual labels:  hardware
dsensor
📈 Digital universal particle concentration sensor ⏲️
Stars: ✭ 13 (-95.42%)
Mutual labels:  hardware

MSI Keyboard LED Controller

OS independent* LED Controller for MSI Steelseries laptop keyboards Using Node.js

NPM version

Information

Package msi-keyboard
Description MSI Keyboard LED Controller
Hardware MSI GE, GT Steelseries Keyboard
Node Version >= 0.4

keyboard

Looking for a GUI application?

Usage

Make sure you have the needed usb lib requirements for your OS.

This project now supports full RGB/hex colors.

Generic Linux: libusb-dev libusb-1.0-0-dev

Use it as command line :

https://github.com/Kwaadpepper/msi-keyboard-CLI

if using as a stand alone module:

npm install

Note:

Linux and *nix systems may require sudo to access the hid device interface.

*Not tested on all platforms. Platform tests appreciated

// require the LED module
var keyboard = require('msi-keyboard')();

// Set left region to high intensity, color red
keyboard.color('left', {
  color: 'red',
  intensity: 'high'
});

// Set middle region to green default high intensity
keyboard.color('middle', 'green');


// Set right region to blue with light intensity
keyboard.color('right', {
  color: 'blue',
  intensity: 'light',
});


// Hardware modes
// Setting .color() will Not affect the hardware defined colors for modes

// Set Hardware mode to breath
keyboard.mode('breathe', 'green');


// Blinking
// Set the keyboard.color() Before calling .blink()
// Refer to examples/blinkMulti.js

// Blink all the keyboard LEDs to 750ms
keyboard.blink(750);


// Blink Only left and right regions at 750ms
keyboard.blink(['left','right'], 750);


// Use the default blink, time: 1000ms
keyboard.blink();


// Stop the blink after 5000ms
setTimeout(keyboard.stopBlink, 5000);

Colors

keyboard.colors(String region, String Color);

Colors must be set before using keyboard.blink();

They will not affect hardware-default modes such as Wave and Breathing.

All colors supported by Colors.js are now supported here

To set a color use keyboard.colors() There are two ways to set the color to a region:

keyboard.color('middle', 'green');
keyboard.color('middle', {color:'#ffffff', intensity:'high'});
keyboard.color('middle', {color:'#4654BD', intensity:'high'});

Intensity

keyboard.colors(String region, {String color, String intensity});

The color intensity to white can be set via keyboard.colors();

The following intensities are used:

light
low
med
high

To set it:

keyboard.color('right', {
  color: '#1CA626',
  intensity: 'med',  // light, low, med, high
});

##Modes keyboard.mode(String mode, String primaryColor, String secondaryColor); keyboard.mode(String mode, Object left, Object middle, Object right, Integer cyclePeriod);

MSI Steelseries keyboards have built modes.

Breathe and Wave modes support fading between colors, which can be set when calling the keyboard.mode() method.

Passing in only one color argument defaults the secondaryColor to 'black':

keyboard.mode(String mode, String primaryColor);

You can also set each region's color individually:

keyboard.mode(String mode, String leftPrimary, String middlePrimary, String rightPrimary, Integer cyclePeriod);

keyboard.mode(String mode, Object left, Object middle, Object right, Integer cyclePeriod);

Region objects are defined as such:

right: {
  primary: {
    color: 'red',
    intensity: 'high'
  },
  secondary: {
    color: 'blue',
    intensity: 'high'
  }
}

Which is equivalent to:

right: {
  color: 'red',
  intensity: 'high',
  secondary: {
    color: 'blue',
    intensity: 'high'
  }
}

You can also define just the primary and secondary colors, leaving the intensities to their default (high):

right: {
  primary: 'red',
  secondary: 'blue'
}

If you specify the color and intensity directly in the Region object, you can set just one of the secondary fields and the other will take the default from the primary (secondary color will be red with light intensity):

right: {
  color: 'red',
  intensity: 'high',
  secondary: {intensity:'light'}
}

The cyclePeriod defaults to 2 seconds when not passed in.

The modes defined by the hardware are:

Normal
Gaming
Breathe
Demo
Wave

Usage:

keyboard.mode('breathe', 'green', 'red', 'yellow');

##Regions keyboard.colors(String region, String color);

There are three regions on the Steelseries keyboard:

Left
Middle
Right

Each can have a color and intensity set.

##Blink keyboard.blink(Time milliseconds);

The time is the speed in which the keyboard is to blink.

keyboard.colors(); Must be set before using keyboard.blink();

Usage:

// keyboard.color(...);


keyboard.blink(750);

To blink one, or two regions only:

// keyboard.color(...);


keyboard.blink(['left','right'], 750);

Examples

You can view more examples in the example folder.

Confirmed Systems

OS: Debain 8
Kernel: Linux 4.4.0 AMD
Node: v5 / v6
libusb-dev: v0.1.12

---

OS: Arch Linux
Kernel: 4.5.1-1-ARCH
Node: v6.0.0
libusb v0.1.12


---

OS: Ubuntu 16.04
Kernel: 4.4.14
Node: v6
libusb v0.1.12

LICENSE

(MIT License)

Copyright (c) 2013 | Steve Lacy (http://slacy.me)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].