twelite-sdk
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

TWELITE SDK for JavaScript

Build Status

This project is UNOFFICIAL SDK of TWELITE.

What is TWELITE?

https://mono-wireless.com/jp/index.html

Getting Started

Install

$ npm install --save twelite-sdk
// or 
$ yarn add twelite-sdk

Build

This SDK depends on node-serialport. In some cases, the module requires a preparation to work well. See serialport#installation-special-cases

Usage

import {Twelite, ChangeOutputCommand} from 'twelite-sdk';
// You can import with ES6 module style if you use anu bundler, TypeScript and so on.
// import {Twelite, ChangeOutputCommand} from 'twelite-sdk';
 
Twelite.list()
    .serialPorts(([port])=>{
        const twelite = new Twelite(port.comName);
        twelite.open()
            .then(()=>{
                const command = new ChangeOutputCommand();
                command.digital = [0, -1, -1, -1];
                twelite.write(command);
            })
    });
 

Readme

Keywords

Package Sidebar

Install

npm i twelite-sdk

Weekly Downloads

2

Version

0.0.2

License

MIT

Last publish

Collaborators

  • tatsuya.yamamoto