BLE Disconnect button help needed js

Posted on
  • Yesterday I wrote myself a disconnect button for:






    LED On!
    LED Off!


    from the tutorial page, I did however apparantly not save this small code snippet and I did not find it in my browser history.
    I did try this:

      async function disconnect(){
        gatt.disconnect();
     } 
    

    and
    deviceObj.gatt.disconnect().
    which both did not work.
    Puck.js2.1a

  • I'm afraid I don't understand the question - are you trying to write some code that runs on an Espruino device that disconnects it from the currently connected computer when a button is pressed?

    Or are you trying to do something else?

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

BLE Disconnect button help needed js

Posted by Avatar for user157578 @user157578

Actions