0.4.1 • Published 8 years ago

blendmicro v0.4.1

Weekly downloads
5
License
MIT
Repository
github
Last release
8 years ago

BlendMicro npm

Node.js module for BlendMicro and BLENano with BLE.

Node.js <---(BLE)---> BlendMicro/BLENano

sites

Circle CI

Install

% npm i blendmicro

BLE Terminal

% npm i blendmicro coffee-script -g
% blendmicro -help
% blendmicro -list
% blendmicro -term [DEVICE_NAME]

Samples

see samples directory.

Usage

Open

blendmicro side

#include <SPI.h>
#include <boards.h>
#include <RBL_nRF8001.h>

void setup(){
  ble_set_name("BlendMicro");
  ble_begin();
}

if you are using BLE Nano, see samples/ directory.

node.js side

var BlendMicro = require('blendmicro');

// search device with BLE peripheral name
var bm = new BlendMicro("BlendMicro");

// search with deefault name "BlendMicro"
var bm = new BlendMicro();

bm.on('open', function(){
  console.log("open!!");
});

Read

bm.on("data", function(data){
  console.log(data.toString());
});

Write

bm.write("hello");

bm.write( new Buffer([1,2,3]) );

Close

bm.close(function(){
  console.log("closed");
});

Auto re-connection

bm.reconnect = false // default is "true" (enabled)

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request
0.4.1

8 years ago

0.4.0

8 years ago

0.3.1

8 years ago

0.3.0

8 years ago

0.2.4

9 years ago

0.2.3

9 years ago

0.2.2

9 years ago

0.2.1

9 years ago

0.2.0

9 years ago

0.1.2

9 years ago

0.1.1

10 years ago

0.1.0

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago