GithubHelp home page GithubHelp logo

00mjk / aura-sdk-java Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fiercestt/aura-sdk-java

0.0 0.0 0.0 88 KB

A WORKING, documented Asus Aura SDK wrapper for Java.

License: GNU General Public License v3.0

Java 100.00%

aura-sdk-java's Introduction

Asus Aura SDK Wrapper for Java

What is It?

A Java Wrapper for the Asus Aura SDK that allows you to control your lights (GPU, Motherboard, RGB Headers, Asus Device, etc).

Note: This will only work on a 32bit jvm.

Documentation

See the wiki.

Installation

Currently, you can add the jar manually to the classpath from the releases. I will be making a maven repo for it soon. Please note, that a Com4j dll will be created in the directory that the program is executed. This is required to interact with the Aura COM Library.

Does it Actually Work (Unlike others)?

YES!
The provided Aura SDK on the website (version 2.0) does not work. Instead, the Asus Aura SDK was ported to a COM Type Library which this wrapper is interfacing.

Building

The project now uses Lombok, follow this this guide to configure it with your IDE.

Quick Start Example

import ca.fiercest.aurasdk.AuraRGBLight;
import ca.fiercest.aurasdk.AuraSDK;
import ca.fiercest.aurasdk.AuraSDKDevice;
import ca.fiercest.aurasdk.Color;

public class Quickstart
{
    public static void main(String... args) throws Exception
    {
        //Create the Aura SDK Object
        AuraSDK sdk = new AuraSDK();

        //Create a custom Color (using ca.fiercest.aurasdk.Color)
        Color myRedColor = new Color(255, 0, 0);

        //Set all device Colors
        sdk.setAllColors(myRedColor);

        for(AuraSDKDevice device : sdk.getDevices())
        {
            //Get the name of the device.
            String deviceName = device.getName();
            //Get all of the light zones for this device.
            List<AuraRGBLight> deviceLightZones = device.getLightZones();
            //Get the amount of light zones from the list size.
            int lightCount = deviceLightZones.size();
            //Print the device info.
            System.out.println("Found Device Name: " + deviceName + ", Light Zones: " + lightCount);

            //Get the first light zone from this device
            AuraRGBLight deviceFirstLight = deviceLightZones.get(0);
            //Set its color
            deviceFirstLight.setColor(new Color(0, 255, 0)); //Green
            //Print the zone name and its color
            System.out.println("Light Zone Name: " + deviceFirstLight.getName() + ", Zone Color: " + deviceFirstLight.getColor());
        }

        //Wait so we can see the effects.
        Thread.sleep(2500);

        //Manually Release Control of the SDK (recommended, but should automatically invoke on shutdown if not done manually).
        sdk.ReleaseControl();
    }
}

aura-sdk-java's People

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.