publishing

Dependencies:   USBDevice

Committer:
elouis
Date:
Wed Mar 22 19:42:57 2017 +0000
Revision:
8:9eff4634d9dd
Parent:
6:64cee3b9f02e
test;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
asilva14 0:fd5a76956754 1 /*******************************************************************************
asilva14 0:fd5a76956754 2 * Copyright (C) 2016 Maxim Integrated Products, Inc., All Rights Reserved.
elouis 8:9eff4634d9dd 3 *
asilva14 0:fd5a76956754 4 * Permission is hereby granted, free of charge, to any person obtaining a
asilva14 0:fd5a76956754 5 * copy of this software and associated documentation files (the "Software"),
asilva14 0:fd5a76956754 6 * to deal in the Software without restriction, including without limitation
asilva14 0:fd5a76956754 7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
asilva14 0:fd5a76956754 8 * and/or sell copies of the Software, and to permit persons to whom the
asilva14 0:fd5a76956754 9 * Software is furnished to do so, subject to the following conditions:
asilva14 0:fd5a76956754 10 *
asilva14 0:fd5a76956754 11 * The above copyright notice and this permission notice shall be included
asilva14 0:fd5a76956754 12 * in all copies or substantial portions of the Software.
asilva14 0:fd5a76956754 13 *
asilva14 0:fd5a76956754 14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
asilva14 0:fd5a76956754 15 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
asilva14 0:fd5a76956754 16 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
asilva14 0:fd5a76956754 17 * IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES
asilva14 0:fd5a76956754 18 * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
asilva14 0:fd5a76956754 19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
asilva14 0:fd5a76956754 20 * OTHER DEALINGS IN THE SOFTWARE.
asilva14 0:fd5a76956754 21 *
asilva14 0:fd5a76956754 22 * Except as contained in this notice, the name of Maxim Integrated
asilva14 0:fd5a76956754 23 * Products, Inc. shall not be used except as stated in the Maxim Integrated
asilva14 0:fd5a76956754 24 * Products, Inc. Branding Policy.
asilva14 0:fd5a76956754 25 *
asilva14 0:fd5a76956754 26 * The mere transfer of this software does not imply any licenses
asilva14 0:fd5a76956754 27 * of trade secrets, proprietary technology, copyrights, patents,
asilva14 0:fd5a76956754 28 * trademarks, maskwork rights, or any other form of intellectual
asilva14 0:fd5a76956754 29 * property whatsoever. Maxim Integrated Products, Inc. retains all
asilva14 0:fd5a76956754 30 * ownership rights.
asilva14 0:fd5a76956754 31 *******************************************************************************
asilva14 0:fd5a76956754 32 */
asilva14 0:fd5a76956754 33 #include "HspBLE.h"
asilva14 0:fd5a76956754 34 #include "Peripherals.h"
asilva14 0:fd5a76956754 35 #include "MAX30001_helper.h"
asilva14 0:fd5a76956754 36
asilva14 0:fd5a76956754 37 #define LOW_BYTE(x) ((uint8_t)((x)&0xFF))
asilva14 0:fd5a76956754 38 #define HIGH_BYTE(x) ((uint8_t)(((x) >> 8) & 0xFF))
asilva14 0:fd5a76956754 39
asilva14 0:fd5a76956754 40 /// define all of the characteristic UUIDs
asilva14 0:fd5a76956754 41 uint8_t HspBLE::temperatureTopCharUUID[] = {0x35,0x44,0x53,0x1b,0x00,0xc3,0x43,0x42,0x97,0x55,0xb5,0x6a,0xbe,0x8e,0x6c,0x67};
asilva14 0:fd5a76956754 42 uint8_t HspBLE::temperatureBottomCharUUID[] = {0x35,0x44,0x53,0x1b,0x00,0xc3,0x43,0x42,0x97,0x55,0xb5,0x6a,0xbe,0x8e,0x6a,0x66};
asilva14 0:fd5a76956754 43 uint8_t HspBLE::accelerometerCharUUID[] = {0xe6,0xc9,0xda,0x1a,0x80,0x96,0x48,0xbc,0x83,0xa4,0x3f,0xca,0x38,0x37,0x05,0xaf};
asilva14 0:fd5a76956754 44 uint8_t HspBLE::heartrateCharUUID[] = {0x62,0x1a,0x00,0xe3,0xb0,0x93,0x46,0xbf,0xaa,0xdc,0xab,0xe4,0xc6,0x48,0xc5,0x69};
asilva14 0:fd5a76956754 45 uint8_t HspBLE::pressureCharUUID[] = {0x1d,0x8a,0x19,0x32,0xda,0x49,0x49,0xad,0x91,0xd8,0x80,0x08,0x32,0xe7,0xe9,0x40};
asilva14 0:fd5a76956754 46 uint8_t HspBLE::dataCharUUID[] = {0xaa,0x8a,0x19,0x32,0xda,0x49,0x49,0xad,0x91,0xd8,0x80,0x08,0x32,0xe7,0xe9,0x40};
asilva14 0:fd5a76956754 47 uint8_t HspBLE::commandCharUUID[] = {0x36,0xe5,0x5e,0x37,0x6b,0x5b,0x42,0x0b,0x91,0x07,0x0d,0x34,0xa0,0xe8,0x67,0x5a};
asilva14 0:fd5a76956754 48 uint8_t HspBLE::ecgCharUUID[] = {0x62,0x1a,0x00,0xe3,0xb0,0x93,0x46,0xbf,0xaa,0xdc,0xab,0xe4,0xc6,0x48,0xc5,0x6a};
asilva14 5:0fdc04a80278 49 uint8_t HspBLE::ecgTwoCharUUID[] = {0x62,0x1a,0x00,0xe3,0xb0,0x93,0x46,0xbf,0xaa,0xdc,0xab,0xe4,0xc6,0x48,0xc5,0x6b};
asilva14 5:0fdc04a80278 50
asilva14 0:fd5a76956754 51
asilva14 6:64cee3b9f02e 52 /// define the BLE device name
asilva14 0:fd5a76956754 53 uint8_t HspBLE::deviceName[] = "MAXREFDES100";
asilva14 0:fd5a76956754 54 /// define the BLE serial number
asilva14 0:fd5a76956754 55 uint8_t HspBLE::serialNumber[] = {0x77, 0x22, 0x33, 0x45, 0x67, 0x89};
asilva14 0:fd5a76956754 56 /// define the BLE service UUID
asilva14 0:fd5a76956754 57 uint8_t HspBLE::envServiceUUID[] = {0x5c,0x6e,0x40,0xe8,0x3b,0x7f,0x42,0x86,0xa5,0x2f,0xda,0xec,0x46,0xab,0xe8,0x51};
asilva14 0:fd5a76956754 58
asilva14 0:fd5a76956754 59 HspBLE *HspBLE::instance = NULL;
asilva14 0:fd5a76956754 60
asilva14 0:fd5a76956754 61 /**
asilva14 0:fd5a76956754 62 * @brief Constructor that inits the BLE helper object
asilva14 0:fd5a76956754 63 * @param ble Pointer to the mbed BLE object
asilva14 0:fd5a76956754 64 */
asilva14 0:fd5a76956754 65 HspBLE::HspBLE(BLE *ble) {
asilva14 0:fd5a76956754 66 bluetoothLE = new BluetoothLE(ble, NUMBER_OF_CHARACTERISTICS);
asilva14 0:fd5a76956754 67 instance = this;
asilva14 0:fd5a76956754 68 notificationUpdateRoundRobin = 0;
asilva14 0:fd5a76956754 69 }
asilva14 0:fd5a76956754 70
asilva14 0:fd5a76956754 71 /**
asilva14 0:fd5a76956754 72 * @brief Constructor that deletes the bluetoothLE object
asilva14 0:fd5a76956754 73 */
asilva14 0:fd5a76956754 74 HspBLE::~HspBLE(void) { delete bluetoothLE; }
asilva14 0:fd5a76956754 75
asilva14 0:fd5a76956754 76 /**
asilva14 0:fd5a76956754 77 * @brief Initialize all of the HSP characteristics, initialize the ble service
asilva14 0:fd5a76956754 78 * and attach callbacks
asilva14 0:fd5a76956754 79 */
asilva14 0:fd5a76956754 80 void HspBLE::init(void) {
asilva14 0:fd5a76956754 81 uint8_t *serialNumberPtr;
asilva14 0:fd5a76956754 82 // uint8_t serialNumberBuffer[6];
asilva14 0:fd5a76956754 83 serialNumberPtr = MAX30001_Helper_getVersion();
asilva14 0:fd5a76956754 84 printf("MAX30001 Version = %02X:%02X:%02X:%02X:%02X:%02X...\n",
asilva14 0:fd5a76956754 85 serialNumberPtr[0], serialNumberPtr[1], serialNumberPtr[2],
asilva14 0:fd5a76956754 86 serialNumberPtr[3], serialNumberPtr[4], serialNumberPtr[5]);
asilva14 0:fd5a76956754 87 serialNumberPtr[3] = 0x00;
asilva14 0:fd5a76956754 88 serialNumberPtr[4] = 0x00;
asilva14 0:fd5a76956754 89 serialNumberPtr[5] = 0x03;
asilva14 0:fd5a76956754 90 printf("BLE DeviceID = %02X:%02X:%02X:%02X:%02X:%02X...\n",
asilva14 0:fd5a76956754 91 serialNumberPtr[0], serialNumberPtr[1], serialNumberPtr[2],
asilva14 0:fd5a76956754 92 serialNumberPtr[3], serialNumberPtr[4], serialNumberPtr[5]);
asilva14 0:fd5a76956754 93
asilva14 0:fd5a76956754 94 bluetoothLE->addCharacteristic(new Characteristic(2 /* number of bytes */,temperatureTopCharUUID,GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_READ | GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_NOTIFY));
asilva14 0:fd5a76956754 95 bluetoothLE->addCharacteristic(new Characteristic(2 /* number of bytes */,temperatureBottomCharUUID,GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_READ | GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_NOTIFY));
asilva14 0:fd5a76956754 96 bluetoothLE->addCharacteristic(new Characteristic(6 /* number of bytes */,accelerometerCharUUID,GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_READ | GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_NOTIFY));
asilva14 0:fd5a76956754 97 bluetoothLE->addCharacteristic(new Characteristic(4 /* number of bytes */,heartrateCharUUID,GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_READ | GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_NOTIFY));
asilva14 0:fd5a76956754 98 bluetoothLE->addCharacteristic(new Characteristic(8 /* number of bytes */,pressureCharUUID,GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_READ | GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_NOTIFY));
asilva14 0:fd5a76956754 99 bluetoothLE->addCharacteristic(new Characteristic(32 /* number of bytes */,dataCharUUID,GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_READ | GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_WRITE));
asilva14 0:fd5a76956754 100 bluetoothLE->addCharacteristic(new Characteristic(1 /* number of bytes */,commandCharUUID,GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_READ | GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_WRITE));
asilva14 1:9532b2cc79aa 101 bluetoothLE->addCharacteristic(new Characteristic(16 /* number of bytes */,ecgCharUUID,GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_READ | GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_NOTIFY));
asilva14 5:0fdc04a80278 102 bluetoothLE->addCharacteristic(new Characteristic(16 /* number of bytes */,ecgTwoCharUUID,GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_READ | GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_NOTIFY));
asilva14 0:fd5a76956754 103 bluetoothLE->initService(serialNumberPtr, deviceName, sizeof(deviceName),envServiceUUID);
asilva14 0:fd5a76956754 104
asilva14 0:fd5a76956754 105 bluetoothLE->onDataWritten(&HspBLE::_onDataWritten);
asilva14 5:0fdc04a80278 106 ticker.attach(this, &HspBLE::tickerHandler, 1);
asilva14 0:fd5a76956754 107 }
asilva14 0:fd5a76956754 108
asilva14 0:fd5a76956754 109 void HspBLE::_onDataWritten(int index) {
asilva14 0:fd5a76956754 110 HspBLE::instance->onDataWritten(index);
asilva14 0:fd5a76956754 111 }
asilva14 0:fd5a76956754 112
asilva14 0:fd5a76956754 113 /**
asilva14 0:fd5a76956754 114 * @brief Callback for written characteristics
asilva14 0:fd5a76956754 115 * @param index Index of whose characteristic is written to
asilva14 0:fd5a76956754 116 */
asilva14 0:fd5a76956754 117 void HspBLE::onDataWritten(int index) {
asilva14 0:fd5a76956754 118 int length;
asilva14 0:fd5a76956754 119 uint8_t *data;
asilva14 0:fd5a76956754 120 printf("onDataWritten ");
asilva14 0:fd5a76956754 121 if (index == CHARACTERISTIC_CMD) {
asilva14 0:fd5a76956754 122 data = bluetoothLE->getDataWritten(index, &length);
asilva14 0:fd5a76956754 123 if (length >= 1) {
asilva14 0:fd5a76956754 124 if (data[0] == 0x00) startDataLogging = false;
asilva14 0:fd5a76956754 125 if (data[0] == 0x01) startDataLogging = true;
asilva14 0:fd5a76956754 126 printf("onDataWritten index %d, data %02X, length %d ",index,data[0],length); fflush(stdout);
asilva14 0:fd5a76956754 127
asilva14 0:fd5a76956754 128 }
asilva14 0:fd5a76956754 129 }
asilva14 0:fd5a76956754 130 }
asilva14 0:fd5a76956754 131
asilva14 0:fd5a76956754 132 void HspBLE::pollSensor(int sensorId, uint8_t *data) {
asilva14 0:fd5a76956754 133
asilva14 0:fd5a76956754 134 switch (sensorId) {
asilva14 0:fd5a76956754 135 case CHARACTERISTIC_TEMP_TOP: {
asilva14 0:fd5a76956754 136 uint16_t uShort;
asilva14 0:fd5a76956754 137 Peripherals::max30205_top()->readTemperature(&uShort);
asilva14 0:fd5a76956754 138 data[0] = HIGH_BYTE(uShort);
asilva14 0:fd5a76956754 139 data[1] = LOW_BYTE(uShort);
asilva14 0:fd5a76956754 140 } break;
asilva14 0:fd5a76956754 141 case CHARACTERISTIC_TEMP_BOTTOM: {
asilva14 0:fd5a76956754 142 uint16_t uShort;
asilva14 0:fd5a76956754 143 Peripherals::max30205_bottom()->readTemperature(&uShort);
asilva14 0:fd5a76956754 144 data[0] = HIGH_BYTE(uShort);
asilva14 0:fd5a76956754 145 data[1] = LOW_BYTE(uShort);
asilva14 0:fd5a76956754 146 } break;
asilva14 0:fd5a76956754 147 case CHARACTERISTIC_ACCELEROMETER: {
asilva14 0:fd5a76956754 148 int i;
asilva14 0:fd5a76956754 149 uint8_t *bytePtr;
asilva14 0:fd5a76956754 150 int16_t acclPtr[3];
asilva14 0:fd5a76956754 151 Peripherals::lis2dh()->get_motion_cached(&acclPtr[0], &acclPtr[1],
asilva14 0:fd5a76956754 152 &acclPtr[2]);
asilva14 0:fd5a76956754 153 bytePtr = reinterpret_cast<uint8_t *>(&acclPtr);
asilva14 0:fd5a76956754 154 for (i = 0; i < sizeof(acclPtr); i++)
asilva14 0:fd5a76956754 155 data[i] = bytePtr[i];
asilva14 0:fd5a76956754 156 } break;
asilva14 0:fd5a76956754 157 case CHARACTERISTIC_PRESSURE: {
asilva14 0:fd5a76956754 158 int i;
asilva14 0:fd5a76956754 159 uint8_t *bytePtr;
asilva14 0:fd5a76956754 160 float temperature;
asilva14 0:fd5a76956754 161 float pressure;
asilva14 0:fd5a76956754 162 Peripherals::bmp280()->ReadCompData(&temperature, &pressure);
asilva14 0:fd5a76956754 163 bytePtr = reinterpret_cast<uint8_t *>(&temperature);
asilva14 0:fd5a76956754 164 for (i = 0; i < sizeof(float); i++)
asilva14 0:fd5a76956754 165 data[i] = bytePtr[i];
asilva14 0:fd5a76956754 166 bytePtr = reinterpret_cast<uint8_t *>(&pressure);
asilva14 0:fd5a76956754 167 for (i = 0; i < sizeof(float); i++)
asilva14 0:fd5a76956754 168 data[i + sizeof(float)] = bytePtr[i];
asilva14 0:fd5a76956754 169 } break;
asilva14 0:fd5a76956754 170 case CHARACTERISTIC_HEARTRATE: {
asilva14 0:fd5a76956754 171 int i;
asilva14 0:fd5a76956754 172 uint8_t *bytePtr;
asilva14 0:fd5a76956754 173 MAX30001::max30001_t heartrateData;
asilva14 0:fd5a76956754 174 Peripherals::max30001()->max30001_ReadHeartrateData(&heartrateData);
asilva14 0:fd5a76956754 175 bytePtr = reinterpret_cast<uint8_t *>(&heartrateData);
asilva14 0:fd5a76956754 176 for (i = 0; i < sizeof(MAX30001::max30001_t); i++)
asilva14 0:fd5a76956754 177 data[i] = bytePtr[i];
asilva14 0:fd5a76956754 178 } break;
asilva14 0:fd5a76956754 179 case CHARACTERISTIC_ECG: {
asilva14 0:fd5a76956754 180 uint8_t *bytePtr;
asilva14 0:fd5a76956754 181 MAX30001::max30001_ecg ecgData;
asilva14 0:fd5a76956754 182 Peripherals::max30001()->max30001_ReadECGData(&ecgData);
asilva14 0:fd5a76956754 183 if (Peripherals::max30001()->max30001_status.bit.eint == 1 || Peripherals::max30001()->max30001_status.bit.pint == 1) {
asilva14 4:f7d1e5d9c73e 184 if(ecgData.etag != 0b110){
asilva14 0:fd5a76956754 185 bytePtr = reinterpret_cast<uint8_t *>(&Peripherals::max30001()->max30001_ECG_FIFO_buffer);
asilva14 5:0fdc04a80278 186 for (int i = 0; i < sizeof(Peripherals::max30001()->max30001_ECG_FIFO_buffer) ; i++){
asilva14 0:fd5a76956754 187 data[i] = bytePtr[i];
asilva14 5:0fdc04a80278 188 }
asilva14 0:fd5a76956754 189 }
asilva14 0:fd5a76956754 190 }
asilva14 0:fd5a76956754 191 }break;
asilva14 0:fd5a76956754 192 }
asilva14 0:fd5a76956754 193 }
asilva14 0:fd5a76956754 194
asilva14 0:fd5a76956754 195 bool HspBLE::getStartDataLogging(void) { return startDataLogging; }
asilva14 0:fd5a76956754 196
asilva14 0:fd5a76956754 197 /**
asilva14 0:fd5a76956754 198 * @brief Timer Callback that updates all sensor characteristic notifications
asilva14 0:fd5a76956754 199 */
asilva14 5:0fdc04a80278 200 void HspBLE::ecgHandler(void) {
asilva14 5:0fdc04a80278 201 uint8_t *bytePtr;
asilva14 5:0fdc04a80278 202 uint8_t data[128];
asilva14 5:0fdc04a80278 203 uint8_t tempData[16];
asilva14 5:0fdc04a80278 204
asilva14 5:0fdc04a80278 205 if (bluetoothLE->isConnected()) {
asilva14 5:0fdc04a80278 206 bytePtr = reinterpret_cast<uint8_t *>(&Peripherals::max30001()->max30001_ECG_FIFO_buffer);
asilva14 5:0fdc04a80278 207 for (int i = 0; i < sizeof(Peripherals::max30001()->max30001_ECG_FIFO_buffer); i++){
asilva14 5:0fdc04a80278 208 data[i] = bytePtr[i];
asilva14 5:0fdc04a80278 209 }
asilva14 5:0fdc04a80278 210 for(int i = 0; i < 8; i++) {
asilva14 5:0fdc04a80278 211 for(int j = 0; j < 16; j++) {
asilva14 5:0fdc04a80278 212 tempData[j] = data[(i*16)+j];
asilva14 5:0fdc04a80278 213 }
asilva14 5:0fdc04a80278 214 bluetoothLE->notifyCharacteristic(CHARACTERISTIC_ECG, tempData);
asilva14 5:0fdc04a80278 215 }
asilva14 5:0fdc04a80278 216 }
asilva14 5:0fdc04a80278 217 }
asilva14 5:0fdc04a80278 218
asilva14 5:0fdc04a80278 219
asilva14 5:0fdc04a80278 220 /**
asilva14 5:0fdc04a80278 221 * @brief Timer Callback that updates all sensor characteristic notifications
asilva14 5:0fdc04a80278 222 */
asilva14 0:fd5a76956754 223 void HspBLE::tickerHandler(void) {
asilva14 0:fd5a76956754 224 uint8_t data[128];
asilva14 0:fd5a76956754 225 if (bluetoothLE->isConnected()) {
asilva14 0:fd5a76956754 226 //pollSensor(CHARACTERISTIC_TEMP_TOP, data);
asilva14 0:fd5a76956754 227 //bluetoothLE->notifyCharacteristic(CHARACTERISTIC_TEMP_TOP, data);
asilva14 0:fd5a76956754 228 //pollSensor(CHARACTERISTIC_TEMP_BOTTOM, data);
asilva14 0:fd5a76956754 229 //bluetoothLE->notifyCharacteristic(CHARACTERISTIC_TEMP_BOTTOM, data);
asilva14 0:fd5a76956754 230 //pollSensor(CHARACTERISTIC_ACCELEROMETER, data);
asilva14 0:fd5a76956754 231 //bluetoothLE->notifyCharacteristic(CHARACTERISTIC_ACCELEROMETER, data);
asilva14 5:0fdc04a80278 232 pollSensor(CHARACTERISTIC_HEARTRATE, data);
asilva14 5:0fdc04a80278 233 bluetoothLE->notifyCharacteristic(CHARACTERISTIC_HEARTRATE, data);
asilva14 5:0fdc04a80278 234 // pollSensor(CHARACTERISTIC_ECG, data);
asilva14 5:0fdc04a80278 235 // uint8_t tempData[16];
asilva14 5:0fdc04a80278 236 // for(int i = 0; i < 8; i++){
asilva14 5:0fdc04a80278 237 // for(int j = 0; j < 16; j++){
asilva14 5:0fdc04a80278 238 // tempData[j] = data[(i*16)+j];
asilva14 5:0fdc04a80278 239 // }
asilva14 5:0fdc04a80278 240 // bluetoothLE->notifyCharacteristic(CHARACTERISTIC_ECG, tempData);
asilva14 5:0fdc04a80278 241 // }
asilva14 5:0fdc04a80278 242 // for(int i = 4; i < 8; i++){
asilva14 5:0fdc04a80278 243 // for(int j = 0; j < 16; j++){
asilva14 5:0fdc04a80278 244 // tempData[j] = data[(i*16)+j];
asilva14 5:0fdc04a80278 245 // }
asilva14 5:0fdc04a80278 246 // bluetoothLE->notifyCharacteristic(CHARACTERISTIC_ECG_TWO, tempData);
asilva14 5:0fdc04a80278 247 // }
asilva14 1:9532b2cc79aa 248 //bluetoothLE->notifyCharacteristic(CHARACTERISTIC_ECG, data);
asilva14 0:fd5a76956754 249 //pollSensor(CHARACTERISTIC_PRESSURE, data);
asilva14 0:fd5a76956754 250 //bluetoothLE->notifyCharacteristic(CHARACTERISTIC_PRESSURE, data);
asilva14 0:fd5a76956754 251 }
asilva14 0:fd5a76956754 252 }