Giter Site home page Giter Site logo

aura-sdk's Introduction

aura-sdk

NPM Version

DEPRECATION NOTICE: I no longer own a PC with Aura RGB components, so I can no longer maintain this library (I don't have any hardware to test it). Feel free to fork the repository if you wish.

ASUS Aura's SDK Nodejs C++ bindings. This package provides an high-level API to manage your rig led show!

WARNING: Because Asus is only releasing their DLL for the 32bits arch, it only works and Node 32 bits.

RGB Stepper Demo

Usage

npm install --save aura-sdk

You have to create an instance of the SDK, and then create an instanace for each device. This examples creates an RGB stepper

const { sleep } = require('./sleep')
const { AuraSDK, Controller } = require('..')

async function main() {
  const auraSDK = new AuraSDK()

  const leds = Controller.joinControllers([
    auraSDK.createMbController(),
    auraSDK.createGPUController(),
    auraSDK.createDramController()
  ])

  while (true) {
    for (color of ['red', 'green', 'blue']) {
      for (let led of leds) {
        led.setColorNow(color)
        await sleep(1000)
      }
    }
  }
}

main()
  .catch(err => console.error(err))

API

AuraSDK

This is the main SDK entrypoint. It creates instances for the different devices types.

  • AuraSDK#createMbController(): Creates an instance of the motherboard controller
  • AuraSDK#createGPUController(): Creates an instance of the GPU controller
  • AuraSDK#createDramController(): Creates an instance of the DRAM controller

Controller

  • Controller.joinControllers(controllers: Controller[]): Joins multiple controllers into one array of callable functions. See the the example for usage.
  • Controller#getLedCount(): Get number of controllable leds in this controller.
  • Controller#getDeviceName(): Get the device name (motherboard, GPU, DRAM).
  • Controller#setColor(index: number, color: string): Set the color of the LED at the given index.
  • Controller#setAllColor(color: string): Sets the color of all the leds in the controller.
  • Controller#setColorNow(index: number, color: string): Sets the color of the LED at the given index and immediately updates them.
  • Controller#setAllColorNow(color: string): Sets the color of all the leds in the controller and immediately updates them.
  • Controller#updateColor(): Updates the LEDs attached to the controller to reflect the current state.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.