0.2.6 • Published 4 years ago

simble v0.2.6

Weekly downloads
9
License
ISC
Repository
github
Last release
4 years ago

simble

A node.js module for simple access to ble (Bluetooth Low Energy = Bluetooth 4.x) devices.

This module is a wrapper for sandeepmistry's great noble package, using Promises instead of callbacks and providing a somewhat different API.

Usage example

The following code (written in CoffeeScript) scans for a nearby Bluetooth LE peripheral that advertises the "Heart Rate" Service (ID: 0x180D). If such a peripheral is found, it requests the peripheral's "Heart Rate Measurement" Characteristic (ID: 0x2A37) (the peripheral will auto-connect, since a connection is required for accessing/requesting a Characteristic). It then subscribes to that characteristic; whenever updates arrive, it will print the current heart rate (byte 1 in the data) to the console.

require("simble").subscribe_to_characteristic 0x180D, 0x2A37, (heart_rate_data) ->
  console.log("Heart rate: #{data[1]} bpm")

API

Unfortunately, the API is not documented yet, so there's very little reason for others to use it yet. I published it because other node.js modules of mine require it.

0.2.6

4 years ago

0.2.5

5 years ago

0.2.3

5 years ago

0.2.2

5 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago