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.

aura-sdk's People

Contributors

danielramosacosta avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aura-sdk's Issues

warning: controllerCountMb < 1 & DRAM controller isn't supported

First things first, great job! Thanks for making this possible!

However, when running the example provided in the readme file, I get

warning: controllerCountMb < 1
DRAM controller isn't supported

From the gif, it appears that we have the same RAM (because your RAM does also not work), and I'm fine with the RAM not being supported. However, what's about the controllerCountMb < 1 warning?

Is there something I can do about it? The mainboard is a Z370-F.

Thanks!

Build Error: Not a valid win32 application

Hi,
I managed to get the library and everything installed perfectly by using NodeJs version 8.17.0. When I try to run the example code, I get this error:

Uncaught Error: \\?\c:\Users\me\node_modules\aura-sdk\build\Release\asus-aura-sdk.node is not a valid Win32 application.
\\?\c:\Users\me\node_modules\aura-sdk\build\Release\asus-aura-sdk.node

If you know the problem, please let me know (this is the current code)

sleep.js:
module.exports.sleep = ms => new Promise(r => setTimeout(r, ms))

HelloWorld.js:

const { sleep } = require('./sleep')
const { AuraSDK } = require('aura-sdk')

const auraSDK = new AuraSDK()

async function main() {
  const mbController = auraSDK.createMbController()
  const gpuController = auraSDK.createGPUController()
  const dramController = auraSDK.createDramController()

  while (true) {
    for(let i = 0; i < 360; i++) {
      mbController.setAllColorNow(`hsl(${i}, 100%, 50%)`)
      gpuController.setAllColorNow(`hsl(${i}, 100%, 50%)`)
      dramController.setAllColorNow(`hsl(${i}, 100%, 50%)`)
      await sleep(50)
    }
  }
}

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

Keyboard support

This project looks very cool, though it unfortunately does not support keyboard led control.

As described in the Aura SDK FAQ at https://www.asus.com/campaign/aura/us/SDK.html, Aura SDK also has support for keyboards (and mice), while this project only supports motherboard, GPU and DRAM control. Please see if it is possible to add a controller for keyboards (mice would of course be nice too, though not relevant in my case).

install error: gyp ERR!

cmd output:

gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:210:5)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Windows_NT 10.0.18363
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Program Files\nodejs\node_modules\aura-sdk
gyp ERR! node -v v12.14.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\adam\AppData\Roaming\npm-cache_logs\2019-12-22T12_00_01_198Z-debug.log

What should be the problem?

Lots of build errors...

Hi!

Not sure if anyone still looks at this but I just built a new Aura Sync capable PC and wanted to use this library but I can't get it built. It gives a ton of build errors so I put them in a pastebin.

https://pastebin.com/Lf5KkhJe

I tried installing an older version of Visual Studio and an older version of Python to see if it would help but I just keep getting the same errors.

Any solutions?

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.