Skip to content

Instantly share code, notes, and snippets.

@jmgrosen
Created November 6, 2015 19:17
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 jmgrosen/02e9f51bf4bb551fc96a to your computer and use it in GitHub Desktop.
Save jmgrosen/02e9f51bf4bb551fc96a to your computer and use it in GitHub Desktop.
var comm = new EasyComm();
var CMD_HOME = 3;
var CMD_TOPBALL = 6;
comm.addCommand(CMD_TOPBALL, EasyComm.VALUE_BOOL, function(onOrOff) {
if (onOrOff) {
turnOnIndicator();
} else {
turnOffIndicator();
}
});
function home() {
comm.send(CMD_HOME, true).then(function() {
stopBlinking();
});
startBlinking();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment