Skip to content

Request explaination #1

Closed
Closed
@Ilzam

Description

@Ilzam

Hi,

Could you explain function or meaning of below coding.

// If we are connected to a peer BLE Server, update the characteristic each time we are reached
// with the current time since boot.
if (connected) {
if (onoff) {
Serial.println("Notifications turned on");
pRemoteCharacteristic->getDescriptor(BLEUUID((uint16_t)0x2902))->writeValue((uint8_t*)notificationOn, 2, true);
}
else {
Serial.println("Notifications turned off");
pRemoteCharacteristic->getDescriptor(BLEUUID((uint16_t)0x2902))->writeValue((uint8_t*)notificationOff, 2, true);
}

onoff = onoff ? 0 : 1;

}
`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions