Skip to content

Instantly share code, notes, and snippets.

View sandeepmistry's full-sized avatar

Sandeep Mistry sandeepmistry

View GitHub Profile
@sandeepmistry
sandeepmistry / gist:5288912
Created April 2, 2013 00:16
Modified test2.js from @mrose17
var noble = require('noble');
var main = function() {
noble.on('stateChange', function(state) {
console.log('stateChange: ' + state);
if (state === 'poweredOn') noble.startScanning(); else noble.stopScanning();
});
noble.on('peripheralDiscover', function(peripheral) {