<commit_before># heartrate [![NPM version][npm-image]][npm-url] [![Dependency Status][depstat-image]][depstat-url]

A Node.js Stream for getting heart rate from Bluetooth Low Energy devices.
This is experimental and tested only with the Wahoo Blue HR device.


## Usage and Installation

```sh
npm install --save heartrate
```

```javascript

var BleHR = require('heartrate');
var stream = new BleHR('foo12345bar1234fo12345bar1234123');
stream.pipe(process.stdout);

```

## API

### `new BleHR(UUID)`
Parameter: `UUID` is string with the UUID.
Returns: `BleHR` instance


### or `new BleHR(options)`
Parameter: `option` is object of options.
Returns: `BleHR` instance


Defaults:
```json
{
  "log": false,
  "uuid": undefined
}
```
*`uuid` is required*

## License

[MIT License](http://en.wikipedia.org/wiki/MIT_License)

[npm-url]: https://npmjs.org/package/heartrate
[npm-image]: https://badge.fury.io/js/heartrate.png

[depstat-url]: https://david-dm.org/mikaelbr/node-heartrate
[depstat-image]: https://david-dm.org/mikaelbr/node-heartrate.png<commit_msg>Update readme to show info for device exploring<commit_after># heartrate [![NPM version][npm-image]][npm-url] [![Dependency Status][depstat-image]][depstat-url]

A Node.js Stream for getting heart rate from Bluetooth Low Energy devices.
This is experimental and tested only with the Wahoo Blue HR device.


## Usage and Installation

```sh
npm install --save heartrate
```

```javascript

var BleHR = require('heartrate');
var stream = new BleHR('foo12345bar1234fo12345bar1234123');
stream.pipe(process.stdout);

```

## API

### `new BleHR(UUID)`
Parameter: `UUID` is string with the UUID.
Returns: `BleHR` instance


### or `new BleHR(options)`
Parameter: `option` is object of options.
Returns: `BleHR` instance


Defaults:
```json
{
  "log": false,
  "uuid": undefined
}
```
*`uuid` is required*

### `BleHR.list()`
Returns: `EventEmitter` instance

Emits all discovered devices on `data` event.

Example:
```javascript
BleHR.list().on('data', function (device) {
  console.log(device.uuid);
});
```

### `BleHR.list.print()`

Sugar for printing all devices found.

Example:
```javascript
BleHR.list.print();
// UUID: foo12345bar1234fo12345bar1234123
//   Local Name        = Wahoo HRM v2.1
//   Service Data      =
//   Service UUIDs     = 180d
```

## License

[MIT License](http://en.wikipedia.org/wiki/MIT_License)

[npm-url]: https://npmjs.org/package/heartrate
[npm-image]: https://badge.fury.io/js/heartrate.png

[depstat-url]: https://david-dm.org/mikaelbr/node-heartrate
[depstat-image]: https://david-dm.org/mikaelbr/node-heartrate.png
{'fraction_non_alphanumeric': 0.16053639846743295, 'fraction_numerical': 0.026053639846743294, 'mean_word_length': 4.700873362445415, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '586087', 'n_tokens_mistral': 1007, 'n_tokens_neox': 884, 'n_words': 229}