Created
August 13, 2015 15:46
-
-
Save elin-moco/999295541432346b0da3 to your computer and use it in GitHub Desktop.
Testing firmata with blue yeast, run it directly with node.js
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
var Bluetooth = require('./lib/blue_yeast').Bluetooth; | |
var device = Bluetooth.connect('BleFirmata', 'd0:6a:cf:58:ee:bd'); | |
device.on('connect', function() { | |
console.log('connect'); | |
try { | |
this.startNotifications(); | |
device.send(new Uint8Array([0xF0, 0x79, 0xF7])); | |
} catch(e) { | |
console.error(e); | |
} | |
}); | |
device.on('data', function(data) { | |
console.log('data', data); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment