So, then I tried the compact example shown below. There is a pause, then the WEB IDE shows "Disconnected". Note: I'm using 1v92.21.
var gatt; NRF.requestDevice({ timeout:2000, filters: [{ services: '0xbbc21523-008e-fe6b-28ee-d6a44f9cb5da' }]}).then( device => device.gatt.connect()).then( g => (gatt=g).getPrimaryService("0xbbc21523-008e-fe6b-28ee-d6a44f9cb5da")).then( service => service.getCharacteristic("0xbbc21525-008e-fe6b-28ee-d6a44f9cb5da")).then( characteristic => characteristic.writeValue(oxff)).then( () => { gatt.disconnect(); console.log("Done!"); } );
@billsalt 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.
So, then I tried the compact example shown below. There is a pause, then the WEB IDE shows "Disconnected". Note: I'm using 1v92.21.