Yes, I was wondering about that - which is why the code's not in there yet.
Any suggestions?
updateServices
NRF.setServices could return an array of objects, so you can do:
NRF.setServices
var gatt = NRF.setServices(...); gatt[0x0000][0x0001].write("Foo");
Or it could take a callback which contained the specific object:
NRF.setServices({ 0x0000: { 0x0001: { value : "Hello", maxLen : 5, readable : true, notify : true, onCreate : function(handle) { // all created now... handle.write("Foo"); } } } });
@Gordon started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Yes, I was wondering about that - which is why the code's not in there yet.
Any suggestions?
updateServices
that updates the values of just the specified services.NRF.setServices
could return an array of objects, so you can do:Or it could take a callback which contained the specific object: