0.1.8 • Published 9 years ago

blue-yeast v0.1.8

Weekly downloads
2
License
Apache License 2....
Repository
-
Last release
9 years ago

BlueYeast

A wrapper for BLE APIs in FxOS. It help developers handle BLE things easier.

How to Install for FxOS

  1. Declare blue-yeast as dependency module in bower.json. Please check bower.json.
  2. Download the module: bower install.
  3. Import the module in <head> in HTML file. html<script src="bower_components/blue-yeast/lib/fxos/blue_yeast.js"></script>
  4. Done.

How to Install for node.js

  1. Declare blue-yeast as dependency module in package.json. Please check package.json.
  2. Download the module: npm install.
  3. Import the module in your script var Bluetooth = require('blue-yeast').Bluetooth;
  4. Done.

How to Use

Connect Device

var ble = Bluetooth.connect('BT_NAME', 'e4:a9:35:a4:e:10');

Send Data

ble.on('connected', function() {
  // You need to send one byte or more data in HEX format at one time.
  ble.send('EE');
});

Subscribe Notifications

ble.startNotifications();
ble.on('data', function(evt) {
  console.log('data: ' + JSON.stringify(evt));
});

Reconnect Device

ble.disconnected();
ble.on('disconnected', function() {
  ble.connect();
})

Ongoing Work

0.1.8

9 years ago

0.1.7

9 years ago

0.1.6

9 years ago

0.1.5

9 years ago

0.1.4

9 years ago

0.1.3

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago

0.0.9

9 years ago

0.0.8

9 years ago