function gotCharacteristics(error, characteristics) {
    isConnected = myBLE.isConnected();
    if (isConnected) {
        if (error) console.log('error: ', error);
        console.log('characteristics: ', characteristics);
        if (characteristics != undefined) {
            myCharacteristic = characteristics[0];
            // Read the value of the first characteristic
            // myBLE.read(myCharacteristic, gotValue);
            // Start notifications on the first characteristic by passing the characteristic
            // And a callback function to handle notifications
            myBLE.startNotifications(myCharacteristic, handleNotifications, 'string');
            // You can also pass in the dataType
            // Options: 'unit8', 'uint16', 'uint32', 'int8', 'int16', 'int32', 'float32', 'float64', 'string'
            // myBLE.startNotifications(myCharacteristic, handleNotifications, 'string');
        }
    }
    updateStatus();
}
// A function that will be called once got characteristics
A function that will be called once got characteristics
A function that will be called once got characteristics
function gotCharacteristics(error, characteristics) {
    isConnected = myBLE.isConnected();
    if (isConnected) {
        if (error) console.log('error: ', error);
        console.log('characteristics: ', characteristics);
        if (characteristics != undefined) {
            myCharacteristic = characteristics[0];
            myBLE.startNotifications(myCharacteristic, handleNotifications, 'string');
        }
    }
    updateStatus();
}
function gotCharacteristics ( error , characteristics ) { isConnected = myBLE . isConnected ( ) ; if ( isConnected ) { if ( error ) console . log ( 'error: ' , error ) ; console . log ( 'characteristics: ' , characteristics ) ; if ( characteristics != undefined ) { myCharacteristic = characteristics [ 0 ] ; myBLE . startNotifications ( myCharacteristic , handleNotifications , 'string' ) ; } } updateStatus ( ) ; }
A function that will be called once got characteristics
A function that will be called once got characteristics
// Read the value of the first characteristic // myBLE.read(myCharacteristic, gotValue); // Start notifications on the first characteristic by passing the characteristic // And a callback function to handle notifications // You can also pass in the dataType // Options: 'unit8', 'uint16', 'uint32', 'int8', 'int16', 'int32', 'float32', 'float64', 'string' // myBLE.startNotifications(myCharacteristic, handleNotifications, 'string');