1.3.0 • Published 1 year ago

xled2 v1.3.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

xled-js

A NodeJS/typescript library similar to scrool/XLED to control Twinkly LED lights.

API Docs

Installation

Via npm

npm install xled2

From source

  • git clone https://github.com/aeroniemi/xled-js.git
  • cd ./xled-js/
  • npm install

Usage

import { Light, rgbColour } from "xled";

async function run() {
	// instantiate the device
	device = new Light("192.168.0.22");
	// get the device name
	console.log(`This device is called ${await device.getName()}`);

	// set device to red, full brightness
	await device.setBrightness(100);

	let red: rgbColour = {
		red: 255,
		green: 0,
		blue: 0,
	};
	await device.setMode("color");
	await device.setRGBColour(red);
}
run();
1.3.0

1 year ago

1.2.5

1 year ago

1.2.4

1 year ago

1.2.3

1 year ago

1.2.2

1 year ago

1.2.1

1 year ago

1.1.0

1 year ago

1.0.0

1 year ago