Skip to content

Instantly share code, notes, and snippets.

@elin-moco
Created August 13, 2015 15:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elin-moco/999295541432346b0da3 to your computer and use it in GitHub Desktop.
Save elin-moco/999295541432346b0da3 to your computer and use it in GitHub Desktop.
Testing firmata with blue yeast, run it directly with node.js
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