Skip to content

aromajoin/controller-sdk-windows

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.