@kano/devices-sdk-uwp
> TODO: description
Last updated a year ago by paulvarache .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @kano/devices-sdk-uwp 
SYNC missed versions from official npm registry.

@kano/devices-sdk-uwp

UWP implementation of the Kano devices SDK. Uses the JS UWP bindings to access the Windows Bluetooth API. Use in your JS UWP projects.

Usage

Create a new project in Visual Studio, choose Javascript > Progressive Web App.

Open the package.appxmanifest file and set the main URL to the URl of your web server. Make sure you enable Bluetooth in the Capabilities.

In a JS module in your project, insert the following (You must have server side module resolution or bundling):

import Devices from '@kano/devices-sdk-uwp/index.js';

Devices.searchForClosestDevice('wand', 5000)
    .then((dev) => {
        return dev.getSoftwareVersion()
            .then((v) => {
                console.log(v);
                return dev.setLed(1, 0x00ff00);
            })
            .then(dev.getAdvertisementName())
            .then((name) => {
                console.log(name)
                dev.on('position', (p) => {
                    console.log(p)
                });
                return dev.subscribePosition();
            });
    })
    .catch(e => console.error(e.message));

Demo

To run the demo, start the web server with node ./demo/wand/server.js. Then open the solution KanoDevicesSdk.sln in visual studio and start the project on your local machine.

Current Tags

  • 1.0.0-alpha.12                                ...           latest (a year ago)

11 Versions

  • 1.0.0-alpha.12                                ...           a year ago
  • 1.0.0-alpha.11                                ...           a year ago
  • 1.0.0-1.0.0-alpha.10.0                                ...           a year ago
  • 1.0.0-alpha.9                                ...           a year ago
  • 1.0.0-alpha.8                                ...           a year ago
  • 1.0.0-alpha.7                                ...           a year ago
  • 1.0.0-alpha.6                                ...           a year ago
  • 1.0.0-alpha.5                                ...           a year ago
  • 1.0.0-alpha.4                                ...           a year ago
  • 1.0.0-alpha.3                                ...           a year ago
  • 1.0.0-alpha.2                                ...           a year ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (3)
Dev Dependencies (2)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |