Datasheet

Example
The following example declares a HRM (Heart Rate Monitor) service, and assigns some characteristics to it:
BLEUuid uuid;
// Constructors
BLEClientService(void);
BLEClientService(BLEUuid bleuuid);
virtual bool begin(void);
virtual bool discover (uint16_t conn_handle);
bool discovered(void);
uint16_t connHandle(void);
void setHandleRange(ble_gattc_handle_range_t handle_range);
ble_gattc_handle_range_t getHandleRange(void);
/*********************************************************************
This is an example for our nRF52 based Bluefruit LE modules
Pick one up today in the adafruit shop!
Adafruit invests time and resources providing this open source code,
please support Adafruit and open-source hardware by purchasing
products from Adafruit!
MIT license, check LICENSE for more information
All text above, and the splash screen below must be included in
any redistribution
*********************************************************************/
/* This sketch show how to use BLEClientService and BLEClientCharacteristic
* to implement a custom client that is used to talk with Gatt server on
* peripheral.
*
* Note: you will need another feather52 running peripheral/custom_HRM sketch
* to test with.
*/
#include <bluefruit.h>
/* HRM Service Definitions
* Heart Rate Monitor Service: 0x180D
* Heart Rate Measurement Char: 0x2A37 (Mandatory)
* Body Sensor Location Char: 0x2A38 (Optional)
*/
BLEClientService hrms(UUID16_SVC_HEART_RATE);
BLEClientCharacteristic hrmc(UUID16_CHR_HEART_RATE_MEASUREMENT);
BLEClientCharacteristic bslc(UUID16_CHR_BODY_SENSOR_LOCATION);
void setup()
{
Serial.begin(115200);
© Adafruit Industries https://learn.adafruit.com/bluefruit-nrf52-feather-learning-guide Page 113 of 175