adafruit_ble_berrymed_pulse_oximeter

adafruit_ble_berrymed_pulse_oximeter

BLE Support for Berrymed Pulse Oximeters

  • Author(s): Adafruit Industries

Implementation Notes

Hardware:

Software and Dependencies:

class adafruit_ble_berrymed_pulse_oximeter.BerryMedPulseOximeterService(service: TransparentUARTService | None = None)

Service for reading from a BerryMed BM1000C or BM100E Pulse oximeter.

property values

All the pulse oximeter values, returned as a PulseOximeterValues namedtuple.

Return None if no data available.

class adafruit_ble_berrymed_pulse_oximeter.PulseOximeterValues(valid, spo2, pulse_rate, pleth, finger_present)

Namedtuple for measurement values.

For example:

bpm = svc.values.pulse_rate
finger_present

Alias for field number 4

pleth

Alias for field number 3

pulse_rate

Alias for field number 2

spo2

Alias for field number 1

valid

Alias for field number 0

adafruit_ble_berrymed_pulse_oximeter.adafruit_ble_transparent_uart

This module provides Services used by MicroChip

class adafruit_ble_berrymed_pulse_oximeter.adafruit_ble_transparent_uart.TransparentUARTService(service: TransparentUARTService | None = None)

Provide UART-like functionality via MicroChip

Parameters:
  • timeout (int) – the timeout in seconds to wait for the first character and between subsequent characters.

  • buffer_size (int) – buffer up to this many bytes. If more bytes are received, older bytes will be discarded.

property in_waiting: int

The number of bytes in the input buffer, available to be read.

read(nbytes: int | None = None) bytes | None

Read characters. If nbytes is specified then read at most that many bytes. Otherwise, read everything that arrives until the connection times out. Providing the number of bytes expected is highly recommended because it will be faster.

Returns:

Data read

Return type:

bytes or None

readinto(buf: array | bytearray | memoryview | rgbmatrix.RGBMatrix | ulab.numpy.ndarray, nbytes: int | None = None) int | None

Read bytes into the buf. If nbytes is specified then read at most that many bytes. Otherwise, read at most len(buf) bytes.

Returns:

number of bytes read and stored into buf

Return type:

int or None (on a non-blocking error)

readline() bytes | None

Read a line, ending in a newline character.

Returns:

the line read

Return type:

bytes or None

reset_input_buffer() None

Discard any unread characters in the input buffer.

write(buf: array | bytearray | bytes | memoryview | rgbmatrix.RGBMatrix | ulab.numpy.ndarray) None

Write a buffer of bytes.