@scarygami/giiker

3.0.0 • Public • Published

giiker

JavaScript wrapper for GiiKER smart cube Bluetooth API

Usage

import GiiKER from '@scarygami/giiker';

// Note: To use Web Bluetooth API trigger action such as button click is required
const button = document.querySelector('button#connect');
button.addEventListener('click', async () => {
	const giiker = await GiiKER.connect();
	giiker.on('move', (move) => {
		console.log(move.face); //=> "F"
		console.log(move.amount); //=> -1
		console.log(move.notation); //=> "F'"
	});
})

Readme

Keywords

none

Package Sidebar

Install

npm i @scarygami/giiker

Weekly Downloads

1

Version

3.0.0

License

MIT

Unpacked Size

36.2 kB

Total Files

5

Last publish

Collaborators

  • scarygami