Skip to content

Instantly share code, notes, and snippets.

@don
Last active December 17, 2015 12:09
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 don/5607769 to your computer and use it in GitHub Desktop.
Save don/5607769 to your computer and use it in GitHub Desktop.
var macAddress = "00:00:AA:BB:CC:DD";
var connected = function() {
// connected, do something
};
var disconnected = funtion(error) {
// disconnected
};
bluetoothSerial.connect(macAddress, connected, disconnected);
var onMessage = function(data) {
console.log(data);
};
bluetoothSerial.subscribe("\n", onMessage, onFailure);
bluetoothSerial.write("c255,0,0\n");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment