Skip to content

Instantly share code, notes, and snippets.

@DanTheMan827
Last active July 29, 2020 16:15
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 DanTheMan827/477550c5f7654de3b22e7a9b843bf312 to your computer and use it in GitHub Desktop.
Save DanTheMan827/477550c5f7654de3b22e7a9b843bf312 to your computer and use it in GitHub Desktop.
var test = "No data";
NRF.setServices({
"78290001-d52e-473f-a9f4-f03da7c67dd1": {
"78290002-d52e-473f-a9f4-f03da7c67dd1": {
value : [0, 0, 0, 0, 0, 0, 0, 0,],
maxLen: 8,
readable : true,
writable : true,
notify: true,
indicate: true,
onWrite : function(evt) {
test = evt;
}
}
}
}, { uart : false, advertise: ["78290002-d52e-473f-a9f4-f03da7c67dd1"] });
setWatch(function() {
NRF.setServices({ }, { uart : true });
}, BTN, { repeat: false, edge:"rising", debounce:50 });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment