# This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.8
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.
from sys import version_info
if version_info >= (2, 6, 0):
def swig_import_helper():
from os.path import dirname
import imp
fp = None
try:
fp, pathname, description = imp.find_module('_pyupm_max30100', [dirname(__file__)])
except ImportError:
import _pyupm_max30100
return _pyupm_max30100
if fp is not None:
try:
_mod = imp.load_module('_pyupm_max30100', fp, pathname, description)
finally:
fp.close()
return _mod
_pyupm_max30100 = swig_import_helper()
del swig_import_helper
else:
import _pyupm_max30100
del version_info
try:
_swig_property = property
except NameError:
pass # Python < 2.2 doesn't have 'property'.
def _swig_setattr_nondynamic(self, class_type, name, value, static=1):
if (name == "thisown"):
return self.this.own(value)
if (name == "this"):
if type(value).__name__ == 'SwigPyObject':
self.__dict__[name] = value
return
method = class_type.__swig_setmethods__.get(name, None)
if method:
return method(self, value)
if (not static):
if _newclass:
object.__setattr__(self, name, value)
else:
self.__dict__[name] = value
else:
raise AttributeError("You cannot add attributes to %s" % self)
def _swig_setattr(self, class_type, name, value):
return _swig_setattr_nondynamic(self, class_type, name, value, 0)
def _swig_getattr_nondynamic(self, class_type, name, static=1):
if (name == "thisown"):
return self.this.own()
method = class_type.__swig_getmethods__.get(name, None)
if method:
return method(self)
if (not static):
return object.__getattr__(self, name)
else:
raise AttributeError(name)
def _swig_getattr(self, class_type, name):
return _swig_getattr_nondynamic(self, class_type, name, 0)
def _swig_repr(self):
try:
strthis = "proxy of " + self.this.__repr__()
except Exception:
strthis = ""
return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
try:
_object = object
_newclass = 1
except AttributeError:
class _object:
pass
_newclass = 0
try:
import weakref
weakref_proxy = weakref.proxy
except Exception:
weakref_proxy = lambda x: x
def getVersion():
return _pyupm_max30100.getVersion()
getVersion = _pyupm_max30100.getVersion
_pyupm_max30100.MAX30100_I2C_ADDRESS_swigconstant(_pyupm_max30100)
MAX30100_I2C_ADDRESS = _pyupm_max30100.MAX30100_I2C_ADDRESS
[docs]class max30100_value(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, max30100_value, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, max30100_value, name)
__repr__ = _swig_repr
__swig_setmethods__["IR"] = _pyupm_max30100.max30100_value_IR_set
__swig_getmethods__["IR"] = _pyupm_max30100.max30100_value_IR_get
if _newclass:
IR = _swig_property(_pyupm_max30100.max30100_value_IR_get, _pyupm_max30100.max30100_value_IR_set)
__swig_setmethods__["R"] = _pyupm_max30100.max30100_value_R_set
__swig_getmethods__["R"] = _pyupm_max30100.max30100_value_R_get
if _newclass:
R = _swig_property(_pyupm_max30100.max30100_value_R_get, _pyupm_max30100.max30100_value_R_set)
def __init__(self):
this = _pyupm_max30100.new_max30100_value()
try:
self.this.append(this)
except Exception:
self.this = this
__swig_destroy__ = _pyupm_max30100.delete_max30100_value
__del__ = lambda self: None
max30100_value_swigregister = _pyupm_max30100.max30100_value_swigregister
max30100_value_swigregister(max30100_value)
_pyupm_max30100.MAX30100_SAMPLE_STATE_IDLE_swigconstant(_pyupm_max30100)
MAX30100_SAMPLE_STATE_IDLE = _pyupm_max30100.MAX30100_SAMPLE_STATE_IDLE
_pyupm_max30100.MAX30100_SAMPLE_STATE_ONE_SHOT_swigconstant(_pyupm_max30100)
MAX30100_SAMPLE_STATE_ONE_SHOT = _pyupm_max30100.MAX30100_SAMPLE_STATE_ONE_SHOT
_pyupm_max30100.MAX30100_SAMPLE_STATE_CONTINUOUS_swigconstant(_pyupm_max30100)
MAX30100_SAMPLE_STATE_CONTINUOUS = _pyupm_max30100.MAX30100_SAMPLE_STATE_CONTINUOUS
_pyupm_max30100.MAX30100_SAMPLE_STATE_CONTINUOUS_BUFFERED_swigconstant(_pyupm_max30100)
MAX30100_SAMPLE_STATE_CONTINUOUS_BUFFERED = _pyupm_max30100.MAX30100_SAMPLE_STATE_CONTINUOUS_BUFFERED
_pyupm_max30100.MAX30100_REG_INTERRUPT_STATUS_swigconstant(_pyupm_max30100)
MAX30100_REG_INTERRUPT_STATUS = _pyupm_max30100.MAX30100_REG_INTERRUPT_STATUS
_pyupm_max30100.MAX30100_REG_INTERRUPT_ENABLE_swigconstant(_pyupm_max30100)
MAX30100_REG_INTERRUPT_ENABLE = _pyupm_max30100.MAX30100_REG_INTERRUPT_ENABLE
_pyupm_max30100.MAX30100_REG_FIFO_WR_PTR_swigconstant(_pyupm_max30100)
MAX30100_REG_FIFO_WR_PTR = _pyupm_max30100.MAX30100_REG_FIFO_WR_PTR
_pyupm_max30100.MAX30100_REG_FIFO_OVF_COUNTER_swigconstant(_pyupm_max30100)
MAX30100_REG_FIFO_OVF_COUNTER = _pyupm_max30100.MAX30100_REG_FIFO_OVF_COUNTER
_pyupm_max30100.MAX30100_REG_FIFO_RD_PTR_swigconstant(_pyupm_max30100)
MAX30100_REG_FIFO_RD_PTR = _pyupm_max30100.MAX30100_REG_FIFO_RD_PTR
_pyupm_max30100.MAX30100_REG_FIFO_DATA_swigconstant(_pyupm_max30100)
MAX30100_REG_FIFO_DATA = _pyupm_max30100.MAX30100_REG_FIFO_DATA
_pyupm_max30100.MAX30100_REG_MODE_CONFIG_swigconstant(_pyupm_max30100)
MAX30100_REG_MODE_CONFIG = _pyupm_max30100.MAX30100_REG_MODE_CONFIG
_pyupm_max30100.MAX30100_REG_SPO2_CONFIG_swigconstant(_pyupm_max30100)
MAX30100_REG_SPO2_CONFIG = _pyupm_max30100.MAX30100_REG_SPO2_CONFIG
_pyupm_max30100.MAX30100_REG_LED_CONFIG_swigconstant(_pyupm_max30100)
MAX30100_REG_LED_CONFIG = _pyupm_max30100.MAX30100_REG_LED_CONFIG
_pyupm_max30100.MAX30100_REG_TEMP_INTEGER_swigconstant(_pyupm_max30100)
MAX30100_REG_TEMP_INTEGER = _pyupm_max30100.MAX30100_REG_TEMP_INTEGER
_pyupm_max30100.MAX30100_REG_TEMP_FRACTION_swigconstant(_pyupm_max30100)
MAX30100_REG_TEMP_FRACTION = _pyupm_max30100.MAX30100_REG_TEMP_FRACTION
_pyupm_max30100.MAX30100_REG_REV_ID_swigconstant(_pyupm_max30100)
MAX30100_REG_REV_ID = _pyupm_max30100.MAX30100_REG_REV_ID
_pyupm_max30100.MAX30100_REG_PART_ID_swigconstant(_pyupm_max30100)
MAX30100_REG_PART_ID = _pyupm_max30100.MAX30100_REG_PART_ID
_pyupm_max30100.MAX30100_A_FULL_swigconstant(_pyupm_max30100)
MAX30100_A_FULL = _pyupm_max30100.MAX30100_A_FULL
_pyupm_max30100.MAX30100_TEMP_RDY_swigconstant(_pyupm_max30100)
MAX30100_TEMP_RDY = _pyupm_max30100.MAX30100_TEMP_RDY
_pyupm_max30100.MAX30100_HR_RDY_swigconstant(_pyupm_max30100)
MAX30100_HR_RDY = _pyupm_max30100.MAX30100_HR_RDY
_pyupm_max30100.MAX30100_SPO2_RDY_swigconstant(_pyupm_max30100)
MAX30100_SPO2_RDY = _pyupm_max30100.MAX30100_SPO2_RDY
_pyupm_max30100.MAX30100_PWR_RDY_swigconstant(_pyupm_max30100)
MAX30100_PWR_RDY = _pyupm_max30100.MAX30100_PWR_RDY
_pyupm_max30100.MAX30100_EN_A_FULL_swigconstant(_pyupm_max30100)
MAX30100_EN_A_FULL = _pyupm_max30100.MAX30100_EN_A_FULL
_pyupm_max30100.MAX30100_EN_TEMP_RDY_swigconstant(_pyupm_max30100)
MAX30100_EN_TEMP_RDY = _pyupm_max30100.MAX30100_EN_TEMP_RDY
_pyupm_max30100.MAX30100_EN_HR_RDY_swigconstant(_pyupm_max30100)
MAX30100_EN_HR_RDY = _pyupm_max30100.MAX30100_EN_HR_RDY
_pyupm_max30100.MAX30100_EN_SPO2_RDY_swigconstant(_pyupm_max30100)
MAX30100_EN_SPO2_RDY = _pyupm_max30100.MAX30100_EN_SPO2_RDY
_pyupm_max30100.MAX30100_SHDN_swigconstant(_pyupm_max30100)
MAX30100_SHDN = _pyupm_max30100.MAX30100_SHDN
_pyupm_max30100.MAX30100_RESET_swigconstant(_pyupm_max30100)
MAX30100_RESET = _pyupm_max30100.MAX30100_RESET
_pyupm_max30100.MAX30100_TEMP_EN_swigconstant(_pyupm_max30100)
MAX30100_TEMP_EN = _pyupm_max30100.MAX30100_TEMP_EN
_pyupm_max30100.MAX30100_MODE_DISABLED_swigconstant(_pyupm_max30100)
MAX30100_MODE_DISABLED = _pyupm_max30100.MAX30100_MODE_DISABLED
_pyupm_max30100.MAX30100_MODE_HR_EN_swigconstant(_pyupm_max30100)
MAX30100_MODE_HR_EN = _pyupm_max30100.MAX30100_MODE_HR_EN
_pyupm_max30100.MAX30100_MODE_SPO2_EN_swigconstant(_pyupm_max30100)
MAX30100_MODE_SPO2_EN = _pyupm_max30100.MAX30100_MODE_SPO2_EN
_pyupm_max30100.MAX30100_SPO2_HI_RES_EN_swigconstant(_pyupm_max30100)
MAX30100_SPO2_HI_RES_EN = _pyupm_max30100.MAX30100_SPO2_HI_RES_EN
_pyupm_max30100.MAX30100_SR_50_HZ_swigconstant(_pyupm_max30100)
MAX30100_SR_50_HZ = _pyupm_max30100.MAX30100_SR_50_HZ
_pyupm_max30100.MAX30100_SR_100_HZ_swigconstant(_pyupm_max30100)
MAX30100_SR_100_HZ = _pyupm_max30100.MAX30100_SR_100_HZ
_pyupm_max30100.MAX30100_SR_167_HZ_swigconstant(_pyupm_max30100)
MAX30100_SR_167_HZ = _pyupm_max30100.MAX30100_SR_167_HZ
_pyupm_max30100.MAX30100_SR_200_HZ_swigconstant(_pyupm_max30100)
MAX30100_SR_200_HZ = _pyupm_max30100.MAX30100_SR_200_HZ
_pyupm_max30100.MAX30100_SR_400_HZ_swigconstant(_pyupm_max30100)
MAX30100_SR_400_HZ = _pyupm_max30100.MAX30100_SR_400_HZ
_pyupm_max30100.MAX30100_SR_600_HZ_swigconstant(_pyupm_max30100)
MAX30100_SR_600_HZ = _pyupm_max30100.MAX30100_SR_600_HZ
_pyupm_max30100.MAX30100_SR_900_HZ_swigconstant(_pyupm_max30100)
MAX30100_SR_900_HZ = _pyupm_max30100.MAX30100_SR_900_HZ
_pyupm_max30100.MAX30100_SR_1000_HZ_swigconstant(_pyupm_max30100)
MAX30100_SR_1000_HZ = _pyupm_max30100.MAX30100_SR_1000_HZ
_pyupm_max30100.MAX30100_LED_PW_200_US_13_BITS_swigconstant(_pyupm_max30100)
MAX30100_LED_PW_200_US_13_BITS = _pyupm_max30100.MAX30100_LED_PW_200_US_13_BITS
_pyupm_max30100.MAX30100_LED_PW_400_US_14_BITS_swigconstant(_pyupm_max30100)
MAX30100_LED_PW_400_US_14_BITS = _pyupm_max30100.MAX30100_LED_PW_400_US_14_BITS
_pyupm_max30100.MAX30100_LED_PW_800_US_15_BITS_swigconstant(_pyupm_max30100)
MAX30100_LED_PW_800_US_15_BITS = _pyupm_max30100.MAX30100_LED_PW_800_US_15_BITS
_pyupm_max30100.MAX30100_LED_PW_1600_US_16_BITS_swigconstant(_pyupm_max30100)
MAX30100_LED_PW_1600_US_16_BITS = _pyupm_max30100.MAX30100_LED_PW_1600_US_16_BITS
_pyupm_max30100.MAX30100_LED_CURRENT_0_0_MA_swigconstant(_pyupm_max30100)
MAX30100_LED_CURRENT_0_0_MA = _pyupm_max30100.MAX30100_LED_CURRENT_0_0_MA
_pyupm_max30100.MAX30100_LED_CURRENT_4_4_MA_swigconstant(_pyupm_max30100)
MAX30100_LED_CURRENT_4_4_MA = _pyupm_max30100.MAX30100_LED_CURRENT_4_4_MA
_pyupm_max30100.MAX30100_LED_CURRENT_7_6_MA_swigconstant(_pyupm_max30100)
MAX30100_LED_CURRENT_7_6_MA = _pyupm_max30100.MAX30100_LED_CURRENT_7_6_MA
_pyupm_max30100.MAX30100_LED_CURRENT_11_0_MA_swigconstant(_pyupm_max30100)
MAX30100_LED_CURRENT_11_0_MA = _pyupm_max30100.MAX30100_LED_CURRENT_11_0_MA
_pyupm_max30100.MAX30100_LED_CURRENT_14_2_MA_swigconstant(_pyupm_max30100)
MAX30100_LED_CURRENT_14_2_MA = _pyupm_max30100.MAX30100_LED_CURRENT_14_2_MA
_pyupm_max30100.MAX30100_LED_CURRENT_17_4_MA_swigconstant(_pyupm_max30100)
MAX30100_LED_CURRENT_17_4_MA = _pyupm_max30100.MAX30100_LED_CURRENT_17_4_MA
_pyupm_max30100.MAX30100_LED_CURRENT_20_8_MA_swigconstant(_pyupm_max30100)
MAX30100_LED_CURRENT_20_8_MA = _pyupm_max30100.MAX30100_LED_CURRENT_20_8_MA
_pyupm_max30100.MAX30100_LED_CURRENT_24_0_MA_swigconstant(_pyupm_max30100)
MAX30100_LED_CURRENT_24_0_MA = _pyupm_max30100.MAX30100_LED_CURRENT_24_0_MA
_pyupm_max30100.MAX30100_LED_CURRENT_27_1_MA_swigconstant(_pyupm_max30100)
MAX30100_LED_CURRENT_27_1_MA = _pyupm_max30100.MAX30100_LED_CURRENT_27_1_MA
_pyupm_max30100.MAX30100_LED_CURRENT_30_6_MA_swigconstant(_pyupm_max30100)
MAX30100_LED_CURRENT_30_6_MA = _pyupm_max30100.MAX30100_LED_CURRENT_30_6_MA
_pyupm_max30100.MAX30100_LED_CURRENT_33_8_MA_swigconstant(_pyupm_max30100)
MAX30100_LED_CURRENT_33_8_MA = _pyupm_max30100.MAX30100_LED_CURRENT_33_8_MA
_pyupm_max30100.MAX30100_LED_CURRENT_37_0_MA_swigconstant(_pyupm_max30100)
MAX30100_LED_CURRENT_37_0_MA = _pyupm_max30100.MAX30100_LED_CURRENT_37_0_MA
_pyupm_max30100.MAX30100_LED_CURRENT_40_2_MA_swigconstant(_pyupm_max30100)
MAX30100_LED_CURRENT_40_2_MA = _pyupm_max30100.MAX30100_LED_CURRENT_40_2_MA
_pyupm_max30100.MAX30100_LED_CURRENT_43_6_MA_swigconstant(_pyupm_max30100)
MAX30100_LED_CURRENT_43_6_MA = _pyupm_max30100.MAX30100_LED_CURRENT_43_6_MA
_pyupm_max30100.MAX30100_LED_CURRENT_46_8_MA_swigconstant(_pyupm_max30100)
MAX30100_LED_CURRENT_46_8_MA = _pyupm_max30100.MAX30100_LED_CURRENT_46_8_MA
_pyupm_max30100.MAX30100_LED_CURRENT_50_0_MA_swigconstant(_pyupm_max30100)
MAX30100_LED_CURRENT_50_0_MA = _pyupm_max30100.MAX30100_LED_CURRENT_50_0_MA
[docs]class Callback(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, Callback, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, Callback, name)
__repr__ = _swig_repr
__swig_destroy__ = _pyupm_max30100.delete_Callback
__del__ = lambda self: None
[docs] def run(self, samp):
"""
virtual void
run(max30100_value samp)
"""
return _pyupm_max30100.Callback_run(self, samp)
def __init__(self):
if self.__class__ == Callback:
_self = None
else:
_self = self
this = _pyupm_max30100.new_Callback(_self, )
try:
self.this.append(this)
except Exception:
self.this = this
def __disown__(self):
self.this.disown()
_pyupm_max30100.disown_Callback(self)
return weakref_proxy(self)
Callback_swigregister = _pyupm_max30100.Callback_swigregister
Callback_swigregister(Callback)
[docs]class MAX30100(_object):
"""
API for the Pulse oximeter and heart-rate sensor.
ID: max30100
Name: Pulse Oximeter and Heart-rate Sensor
Category: medical
Manufacturer: maxim
Link:https://www.maximintegrated.com/en/products/analog/sensors-and-
sensor- interface/MAX30100.html
Connection: i2c gpio The MAX30100 is an integrated pulse oximetry and
heartrate monitor sensor solution. It combines two LEDs, a
photodetector, optimized optics, and low-noise analog signal
processing to detect pulse oximetry and heart- rate signals.
I2C sensor which can be used to read: Heart-rate Peripheral capillary
oxygen saturation temperature
C++ includes: max30100.hpp
"""
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, MAX30100, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, MAX30100, name)
__repr__ = _swig_repr
def __init__(self, i2c_bus):
"""
MAX30100(int16_t
i2c_bus)
Oximeter and heart-rate sensor constructor
Initialize Oximeter and heart-rate sensor. Note, the I2C address is
0x57.
Parameters:
-----------
i2c_bus: Target I2C bus
sensor context pointer
Exceptions:
-----------
std::runtime_error: if sensor initialization fails
"""
this = _pyupm_max30100.new_MAX30100(i2c_bus)
try:
self.this.append(this)
except Exception:
self.this = this
__swig_destroy__ = _pyupm_max30100.delete_MAX30100
__del__ = lambda self: None
[docs] def sample(self):
"""
max30100_value sample()
Sample a single set of infrared/red values
Note, all setup (sample rate, LED current, and pulse width must be
done prior to calling this sample method.
One IR/R sample
Exceptions:
-----------
std::runtime_error: on I2C command failure
"""
return _pyupm_max30100.MAX30100_sample(self)
[docs] def sample_continuous(self, gpio_pin, buffered, cb=None):
"""
void
sample_continuous(int gpio_pin, bool buffered, Callback *cb=NULL)
Continuously sample Infrared/Red values.
This method requires a GPIO pin which is used to signal sample/samples
ready. The INT * pin is open-drain and requires a pullup resistor. The
interrupt pin is not designed to sink large currents, so the pull-up
resistor value should be large, such as 4.7k ohm. The RCWL-0530 PCB
which this library was designed with had the I2C lines and INT pin
pulled up to 1.8v.
Note, all setup (sample rate, mode, LED current, and pulse width must
be done prior to calling this sample method.
Parameters:
-----------
gpio_pin: GPIO pin for interrupt (input from sensor INT pin)
buffered: Enable buffered sampling. In buffered sampling mode, the
device reads 16 samples at a time. This can help with I2C read timing.
buffered == true, enable buffered sampling buffered == false, single-
sample mode
cb: Pointer to instance of Callback class. If parameter is left NULL,
a default instance of the Callback class will be used which prints out
the IR/R values.
Exceptions:
-----------
std::runtime_error: on I2C command failure
"""
return _pyupm_max30100.MAX30100_sample_continuous(self, gpio_pin, buffered, cb)
[docs] def sample_stop(self):
"""
void sample_stop()
Stop continuous sampling. Disable interrupts.
"""
return _pyupm_max30100.MAX30100_sample_stop(self)
[docs] def read(self, reg):
"""
uint8_t read(MAX30100_REG
reg)
Read Oximeter and heart-rate sensor registers
Parameters:
-----------
reg: Target register to read
Data returned from sensor
Exceptions:
-----------
std::runtime_error: if I2C read command fails
"""
return _pyupm_max30100.MAX30100_read(self, reg)
[docs] def write(self, reg, wr_data):
"""
void write(MAX30100_REG
reg, uint8_t wr_data)
Write Oximeter and heart-rate sensor registers
Parameters:
-----------
reg: Target register to write
wr_data: Target data to write
Exceptions:
-----------
std::runtime_error: if I2C write command fails
"""
return _pyupm_max30100.MAX30100_write(self, reg, wr_data)
[docs] def version(self):
"""
uint16_t version()
Get sensor version Sensor version is a 2 byte value: upper byte = PART
ID lower byte = REVISION ID
example: version() return 0x1105 0x11 = PART ID 0x05 = REVISION Sensor
version
Exceptions:
-----------
std::runtime_error: on I2C command failure
"""
return _pyupm_max30100.MAX30100_version(self)
[docs] def temperature(self):
"""
float
temperature()
Get temperature reading from device rd_data Temperature in degrees
Celsius
Exceptions:
-----------
std::runtime_error: on I2C command failure
"""
return _pyupm_max30100.MAX30100_temperature(self)
[docs] def mode(self, *args):
"""
MAX30100_MODE mode()
Get the sampling mode
Current sampling mode
Exceptions:
-----------
std::runtime_error: on I2C command failure
"""
return _pyupm_max30100.MAX30100_mode(self, *args)
[docs] def high_res_enable(self, *args):
"""
bool
high_res_enable()
Get the high-resolution enable bit
Current high-resolution bit value
Exceptions:
-----------
std::runtime_error: on I2C command failure
"""
return _pyupm_max30100.MAX30100_high_res_enable(self, *args)
[docs] def sample_rate(self, *args):
"""
MAX30100_SR
sample_rate()
Get the sample rate
Current sample rate
Exceptions:
-----------
std::runtime_error: on I2C command failure
"""
return _pyupm_max30100.MAX30100_sample_rate(self, *args)
[docs] def pulse_width(self, *args):
"""
MAX30100_LED_PW
pulse_width()
Get the LED pulse width
Current LED pulse width
Exceptions:
-----------
std::runtime_error: on I2C command failure
"""
return _pyupm_max30100.MAX30100_pulse_width(self, *args)
[docs] def current(self, ir, r):
"""
void
current(MAX30100_LED_CURRENT ir, MAX30100_LED_CURRENT r)
Set the current for the infrared and red LEDs
Parameters:
-----------
ir: LED current enum
r: LED current enum
Exceptions:
-----------
std::runtime_error: on I2C command failure
"""
return _pyupm_max30100.MAX30100_current(self, ir, r)
[docs] def current_ir(self):
"""
MAX30100_LED_CURRENT current_ir()
Get the infrared LED current
Exceptions:
-----------
std::runtime_error: on I2C command failure
"""
return _pyupm_max30100.MAX30100_current_ir(self)
[docs] def current_r(self):
"""
MAX30100_LED_CURRENT
current_r()
Get the red LED current
Exceptions:
-----------
std::runtime_error: on I2C command failure
"""
return _pyupm_max30100.MAX30100_current_r(self)
[docs] def reset(self):
"""
void reset()
Reset sensor
When the RESET bit is set to one, all configuration, threshold, and
data registers are reset to their power-on-state. The only exception
is writing both RESET and TEMP_EN bits to one at the same time since
temperature data registers 0x16 and 0x17 are not cleared. The RESET
bit is cleared automatically back to zero after the reset sequence is
completed.
Exceptions:
-----------
std::runtime_error: on I2C command failure
"""
return _pyupm_max30100.MAX30100_reset(self)
[docs] def sleep(self, sleep):
"""
void sleep(bool sleep)
Put device into power-save mode. While in power-save mode, all
registers retain their values, and write/read operations function as
normal. All interrupts are cleared to zero in this mode.
Parameters:
-----------
sleep: Enter/exit power-save mode
Exceptions:
-----------
std::runtime_error: on I2C command failure
"""
return _pyupm_max30100.MAX30100_sleep(self, sleep)
__swig_setmethods__["_callback"] = _pyupm_max30100.MAX30100__callback_set
__swig_getmethods__["_callback"] = _pyupm_max30100.MAX30100__callback_get
if _newclass:
_callback = _swig_property(_pyupm_max30100.MAX30100__callback_get, _pyupm_max30100.MAX30100__callback_set)
MAX30100_swigregister = _pyupm_max30100.MAX30100_swigregister
MAX30100_swigregister(MAX30100)
# This file is compatible with both classic and new-style classes.