1.0.1 • Published 6 months ago

@toio/scanner v1.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
6 months ago

@toio/scanner

a npm package for scanning toioCore Cube.

How to install

npm install @toio/scanner

How to use

const { NearestScanner } = require('@toio/scanner')

async function main() {
  // start a scanner to find the nearest cube
  const cube = await new NearestScanner().start()

  // connect to the cube
  cube.connect()

  // set listeners to show toio ID information
  cube
    .on('id:position-id', data => console.log('[POS ID]', data))
    .on('id:standard-id', data => console.log('[STD ID]', data))
    .on('id:position-id-missed', () => console.log('[POS ID MISSED]'))
    .on('id:standard-id-missed', () => console.log('[STD ID MISSED]'))
}

Prerequisites & Verified Environment

see here.

1.0.1

6 months ago

1.0.0

5 years ago