Skip to content

aromajoin/controller-sdk-windows

Repository files navigation

English / 日本語

Controller SDK for Windows

License

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.6+.
  • lease 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

The Apache License (Apache)

Copyright (c) 2017 Aromajoin Corporation

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.