mc-hamster / JMPM

JM Power Meter
http://www.casler.org/wordpress/jm-power-meter-jmpm/
4 stars 1 forks source link

Oximeter - Jumper - Feature request #1

Closed DanBendavid closed 3 years ago

DanBendavid commented 3 years ago

BLE Oximeter with SpO2, Pi and BPM. Exemple of code working with connection/pairing

We should be able to send a cmd to the gateway with char and service UUID.

static BLEUUID charUUID("CDEACB81-5235-4C07-8846-93A37EE6B86D"); static BLEUUID serviceUUID("cdeacb80-5235-4c07-8846-93a37ee6b86d");

int bpm; int spo2; float pi;

static void notifyCallback( BLERemoteCharacteristic pBLERemoteCharacteristic, uint8_t pData, size_t length, bool isNotify) { Serial.print("Notify callback for characteristic "); Serial.print(pBLERemoteCharacteristic->getUUID().toString().c_str()); Serial.print(" of data length "); Serial.println(length); Serial.print("data: "); Serial.println((char*)pData); if (pData[0] == 0x81) { bpm = pData[1]; spo2 = pData[2]; pi = pData[3]; } }

Thank you

mc-hamster commented 3 years ago

I suspect that this may have been filed in the wrong project.

Closing this ticket.