1.2.1 • Published 8 years ago

cue-sdk-node v1.2.1

Weekly downloads
4
License
ISC
Repository
github
Last release
8 years ago

node-cue-sdk


Node.js Corsair Cue SDK wrapper

node-cue-sdk is a Node.js addon for loading and and using the Cue SDK in pure JavaScript.

Documentation

Example with asynchonous functions

var CueSDK = require('node-cue-sdk');

var cue = new CueSDK.CueSDK();

// The CueSDK.set function can also work asynchonously, just add a function to the arguments and it'll be asynchonous
cue.set('A', 255, 255, 0, function() { // This is the function which get called after completion
    console.log('Lights set!');
});

cue.set([
    ['A', 255, 0, 0],
    ['S', 0 , 255, 0],
    ['D', 0, 0, 255]
], function() { // This is the function which get called after completion
    console.log('Three lights set!');
}); // Set A to red, S to green, and D to blue

// fade from black [0, 0, 0] to cyan [0, 255, 255] in 1000ms
cue.fade('Logo', [0, 0, 0], [0, 255, 255], 1000, function() {
    console.log('This will run when the fading has completed!');
});

Example with synchonous functions

var CueSDK = require('node-cue-sdk');

var cue = new CueSDK.CueSDK();

cue.set('W', 255, 255, 255); // Set the W key to #FFFFFF aka white

// You can set multiple colors at the time!
cue.set([
    ['A', 255, 0, 0],
    ['S', 0 , 255, 0],
    ['D', 0, 0, 255]
]); // Set A to red, S to green, and D to blue

// Special keys/lights are also supported!
cue.set('Logo', 255, 255, 0); // Make the Corsair logo yellow

// To turn off all leds
cue.clear();

Requirements

  • Windows (Linux and Mac OSX are currently not supported by the CueSDK)
  • Node.js 5.0.0 or higher

Installation

Make sure you've installed all the necessary build tools, then run this command in the source directory:

$ npm install cue-sdk-node
1.2.1

8 years ago

1.2.0

9 years ago

1.1.3

9 years ago

1.1.2

9 years ago

1.1.1

9 years ago

1.1.0

9 years ago

1.0.17

9 years ago

1.0.16

9 years ago

1.0.15

9 years ago

1.0.14

9 years ago

1.0.13

9 years ago

1.0.12

9 years ago

1.0.11

9 years ago

1.0.10

9 years ago

1.0.9

9 years ago

1.0.8

9 years ago

1.0.7

9 years ago

1.0.6

9 years ago

1.0.5

9 years ago

1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago