Giter Club home page Giter Club logo

controller-sdk-windows's Introduction

English / 日本語

Controller SDK for Windows

License Join the community on Spectrum

The Windows version of AromaShooterController SDK which is used to communicate with Aroma Shooter devices.

Table of Contents

  1. Supported devices
  2. Prerequisites
  3. Installation
  4. Usage
  5. License

Supported devices

  • Aroma Shooter 1 USB Type
  • Aroma Shooter 2 (via USB only)

Prerequisites

  • Windows version: 10+.
  • .NET Framework: >= 4.7.1
  • Please install device driver.

Installation

Sample

You might want to try the sample app by using Visual Studio.

Usage

0. Connecting

Firstly, get the reference of AromaShooterController
AromaShooterController aromaShooterController = AromaShooterController.SharedInstance;
Setup and connect devices
aromaShooterController.Setup();

1. Functions that compatible with both Aroma Shooter 1 & 2

a. Diffuse from all connected Aroma Shooters.
aromaShooterController.Diffuse(int durrationMillisecs, int[] ports, bool booster);
*@param durationMillisecs		diffusing time (ms).
*@param ports					array of cartridge number to diffuse, value: 1~6.
*@param booster                 true = use booster, false = not use booster.

For example, the following code will diffuse cartridge 1, 2, and 3 for 3 seconds with booster.

aromaShooterController.Diffuse(3000, new int[]{1, 2, 3}, true);
b. Diffuse from a specific Aroma Shooter.
aromaShooterController.Diffuse(int durationMillisecs, int[] ports, bool booster, string shooterName);

For example, the following code will diffuse cartridge 1, 2, and 3 for 3 seconds at Aroma Shooter with serial number "ASN1UA0001".

aromaShooterController.Diffuse(3000, new int[] { 1, 2, 3}, true, "ASN1UA0001");
c. Stop diffusing from all connected Aroma Shooters.
aromaShooterController.Stop();
d. Stop diffusing from a specific Aroma Shooters.
aromaShooterController.Stop(string shooterName);
e. Get the list of connected Aroma Shooters
List<string> connectedAromaShooters = ASController.GetConnectedDevices();

2. Functions that compatible with Aroma Shooter 2 only

a. Diffuse from all connected Aroma Shooters with intensity control.
ASController.DiffuseAll(int durationMillisecs, List<AromaPort> ports, int boosterIntensity, int fanIntensity);

AromaPort class has two members: number and intensity, in which number is the port to diffuse, intensity is the strength of diffusing (0~100).

b. Diffuse from a specific Aroma Shooter with intensity control.
ASController.Diffuse(int durationMillisecs, List<AromaPort> ports, int boosterIntensity, int fanIntensity, string shooterName);
c. Stop diffusing from all connected Aroma Shooters on specific ports.
ASController.Stop(int[] ports, bool stopBooster, bool stopFan);

When stopBooster is true, booster is stopped. When stopFan is true the attached fan is stopped.

d. Stop diffusing from a specific Aroma Shooter on specific ports.
ASController.Stop(string shooterName, int[] ports, bool stopBooster, bool stopFan);

If you get any issues or require any new features, please create a new issue.

License

Please check the LICENSE file for the details.

controller-sdk-windows's People

Contributors

hanh-aj avatar quangctkm9207 avatar trungchubao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

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.