obniz Parts Library

UA651BLE

GitHub
UA651BLE
Usable Devices :
obniz_board
m5stickc
obnizble
esp32
esp32gateway
m5stackbasic
ak-030
obnizble_lte
obniz_plc

UA651BLE

This is a blood pressure meter from A&D Corporation.

Pairing is required for data communication. Pairing can be done by pressing and holding the power button until "Pr" is displayed.
The device will record the paired device, return localName only to that device, and transfer data only to that device after the connection is established.

isDevice(peripheral)

Judges whether or not it is UA651BLE based on the advertised information received by the BLE.

  • If communication errors occur frequently, try re-pairing the UA651BLE.
// Javascript Example
await obniz.ble.initWait();
const UA651BLE = Obniz.getPartsClass("UA651BLE");
obniz.ble.scan.onfind = async (peripheral) => {
  if (UA651BLE.isDevice(peripheral)) {
    console.log("device find");
  }
};
await obniz.ble.scan.startWait();

new UA651BLE(peripheral)

Instances are created based on the advertised information received by the BLE.

// Javascript Example
await obniz.ble.initWait();
const UA651BLE = Obniz.getPartsClass("UA651BLE");
obniz.ble.scan.onfind = async (peripheral) => {
  if (UA651BLE.isDevice(peripheral) ) {
    console.log("device find");
    const device = new UA651BLE(peripheral);
  }
};
await obniz.ble.scan.startWait();

[await]getDataWait()

Connects to the device and collects data in batches.
The only data that can be retrieved is the data that the device has not yet sent.

After the data is sent, the connection to the device is automatically terminated.

// Javascript Example
await obniz.ble.initWait();
const UA651BLE = Obniz.getPartsClass("UA651BLE");
obniz.ble.scan.onfind = async (peripheral) => {
  if (UA651BLE.isDevice(peripheral)) {
    console.log("find");
    const device = new UA651BLE(peripheral);
    
    const data = await device.getDataWait();
    
    console.log(data);
  }
};
await obniz.ble.scan.startWait();

Output format is here. Blood pressure data is in mmHg or kPa format, and Pulse rate data is in pulse/min format.

https://obniz.github.io/obniz/obnizjs/interfaces/parts.ua651ble.ua651bleresult.html

{
  SystolicPressure_mmHg?: number; // ex) 128mmHg → 0x80 = 128, 0x00
  DiastolicPressure_mmHg?: number;
  MeanArterialPressure_mmHg?: number;
  SystolicPressure_kPa?: number; // ex) 17.6Kpa → 0xB0 = 176, 0xF0
  DiastolicPressure_kPa?: number;
  MeanArterialPressure_kPa?: number;
  bodyMoved?: number;
  cuffFitLoose?: boolean;
  irregularPulseDetected?: boolean;
  improperMeasurement?: boolean;
  PulseRate?: number;
}

Supported from: obniz.js 3.14.0