Skip to content

mitsuoka0423/obniz-ir-unit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

obniz-ir-unit

obnizM5Stack用赤外線送受信ユニットを操作するためのライブラリです。

// イメージ

インストール

$ npm install obniz-ir-unit

サンプルコード

import Obniz from 'obniz';
import IrUnit from 'obniz-ir-unit';

const obniz = new Obniz('OBNIZ_ID_HERE');
const pin = {
  in: 0,
  out: 1,
  vcc: 2,
  gnd: 3,
};

obniz.onconnect = async () => {
  const irUnit = new IrUnit(obniz, pin);

  irUnit.send([1, 1, 1, 0, 0, 0]);
  await obniz.wait(1000);

  obniz.close();
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published