BLE Chat app

Posted on
  • Hello everyone,
    currently I'm developing an application for my bachelor's thesis and I want to control the watch via BLE on my phone.

    I have already established a connection and can discover and read the characteristics of the watch. What I want to achieve is also writing to a characteristic and reading it with the watch (to turn on/off the Heart Rate Sensor etc.). Is there a function which monitors the watch's writable characteristics/services? And if not how should I approach this? (Or is this even the right way to do it? )
    Much thanks in advance.. If you need further info / code I'm happy to provide it.

    Greetings

    EDIT: I've found it :)

    NRF.setServices({
      0xBCDE : {
        0xABCD : {
          writable : true,
          onWrite : function(evt) {
            digitalWrite([LED3,LED2,LED1], evt.data[0]);
          }
        }
      }
    });
    
  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

BLE Chat app

Posted by Avatar for user128987 @user128987

Actions