Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Stephen Schiffli
committed
Aug 9, 2017
1 parent
ac85f3d
commit dad8cc3
Showing
7 changed files
with
453 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule MetaWear-SDK-Cpp
updated
45 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/** | ||
* Created by sschiffli on 4/21/16. | ||
*/ | ||
var MetaWear = require('metawear'); | ||
|
||
// If you know the MAC address, you can uncomment this line | ||
//MetaWear.discoverByAddress('cb:7d:c5:b0:20:8f', function(metawear) { | ||
MetaWear.discover(function (device) { | ||
console.log('got em'); | ||
// you can be notified of disconnects | ||
device.on('disconnect', function () { | ||
console.log('we got disconnected! :( '); | ||
}); | ||
// you'll need to call connect and set up | ||
device.connectAndSetUp(function (error) { | ||
console.log('were connected!'); | ||
setTimeout(function () { | ||
device.disconnect(function (error) { | ||
console.log('disconnect call finished'); | ||
}); | ||
}, 1000); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
var MetaWear = require('./lib/metawear'); | ||
|
||
module.exports = MetaWear; |
Oops, something went wrong.