Source code for pyupm_bmp280

# 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_bmp280', [dirname(__file__)])
        except ImportError:
            import _pyupm_bmp280
            return _pyupm_bmp280
        if fp is not None:
            try:
                _mod = imp.load_module('_pyupm_bmp280', fp, pathname, description)
            finally:
                fp.close()
            return _mod
    _pyupm_bmp280 = swig_import_helper()
    del swig_import_helper
else:
    import _pyupm_bmp280
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



def getVersion():
    return _pyupm_bmp280.getVersion()
getVersion = _pyupm_bmp280.getVersion
[docs]class IModuleStatus(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, IModuleStatus, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, IModuleStatus, name) def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined - class is abstract") __repr__ = _swig_repr
[docs] def getModuleName(self): """ virtual const char* getModuleName()=0 Returns name of module. This is the string in library name after libupm_ name of module """ return _pyupm_bmp280.IModuleStatus_getModuleName(self)
__swig_destroy__ = _pyupm_bmp280.delete_IModuleStatus __del__ = lambda self: None
IModuleStatus_swigregister = _pyupm_bmp280.IModuleStatus_swigregister IModuleStatus_swigregister(IModuleStatus)
[docs]class ITemperatureSensor(IModuleStatus): """ Interface for Temperature Sensors. C++ includes: iTemperatureSensor.hpp """ __swig_setmethods__ = {} for _s in [IModuleStatus]: __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {})) __setattr__ = lambda self, name, value: _swig_setattr(self, ITemperatureSensor, name, value) __swig_getmethods__ = {} for _s in [IModuleStatus]: __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {})) __getattr__ = lambda self, name: _swig_getattr(self, ITemperatureSensor, name) def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined - class is abstract") __repr__ = _swig_repr
[docs] def getTemperatureCelsius(self): """virtual int getTemperatureCelsius()=0 """ return _pyupm_bmp280.ITemperatureSensor_getTemperatureCelsius(self)
__swig_destroy__ = _pyupm_bmp280.delete_ITemperatureSensor __del__ = lambda self: None
ITemperatureSensor_swigregister = _pyupm_bmp280.ITemperatureSensor_swigregister ITemperatureSensor_swigregister(ITemperatureSensor)
[docs]class IPressureSensor(IModuleStatus): __swig_setmethods__ = {} for _s in [IModuleStatus]: __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {})) __setattr__ = lambda self, name, value: _swig_setattr(self, IPressureSensor, name, value) __swig_getmethods__ = {} for _s in [IModuleStatus]: __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {})) __getattr__ = lambda self, name: _swig_getattr(self, IPressureSensor, name) def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined - class is abstract") __repr__ = _swig_repr
[docs] def getPressurePa(self): """ virtual int getPressurePa()=0 """ return _pyupm_bmp280.IPressureSensor_getPressurePa(self)
__swig_destroy__ = _pyupm_bmp280.delete_IPressureSensor __del__ = lambda self: None
IPressureSensor_swigregister = _pyupm_bmp280.IPressureSensor_swigregister IPressureSensor_swigregister(IPressureSensor)
[docs]class IHumiditySensor(IModuleStatus): """ Interface for Humidity Sensors. C++ includes: iHumiditySensor.hpp """ __swig_setmethods__ = {} for _s in [IModuleStatus]: __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {})) __setattr__ = lambda self, name, value: _swig_setattr(self, IHumiditySensor, name, value) __swig_getmethods__ = {} for _s in [IModuleStatus]: __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {})) __getattr__ = lambda self, name: _swig_getattr(self, IHumiditySensor, name) def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined - class is abstract") __repr__ = _swig_repr
[docs] def getHumidityRelative(self): """virtual int getHumidityRelative()=0 """ return _pyupm_bmp280.IHumiditySensor_getHumidityRelative(self)
__swig_destroy__ = _pyupm_bmp280.delete_IHumiditySensor __del__ = lambda self: None
IHumiditySensor_swigregister = _pyupm_bmp280.IHumiditySensor_swigregister IHumiditySensor_swigregister(IHumiditySensor) _pyupm_bmp280.BMP280_DEFAULT_I2C_BUS_swigconstant(_pyupm_bmp280) BMP280_DEFAULT_I2C_BUS = _pyupm_bmp280.BMP280_DEFAULT_I2C_BUS _pyupm_bmp280.BMP280_DEFAULT_SPI_BUS_swigconstant(_pyupm_bmp280) BMP280_DEFAULT_SPI_BUS = _pyupm_bmp280.BMP280_DEFAULT_SPI_BUS _pyupm_bmp280.BMP280_DEFAULT_ADDR_swigconstant(_pyupm_bmp280) BMP280_DEFAULT_ADDR = _pyupm_bmp280.BMP280_DEFAULT_ADDR _pyupm_bmp280.BMP280_CHIPID_swigconstant(_pyupm_bmp280) BMP280_CHIPID = _pyupm_bmp280.BMP280_CHIPID _pyupm_bmp280.BME280_DEFAULT_I2C_BUS_swigconstant(_pyupm_bmp280) BME280_DEFAULT_I2C_BUS = _pyupm_bmp280.BME280_DEFAULT_I2C_BUS _pyupm_bmp280.BME280_DEFAULT_SPI_BUS_swigconstant(_pyupm_bmp280) BME280_DEFAULT_SPI_BUS = _pyupm_bmp280.BME280_DEFAULT_SPI_BUS _pyupm_bmp280.BME280_DEFAULT_ADDR_swigconstant(_pyupm_bmp280) BME280_DEFAULT_ADDR = _pyupm_bmp280.BME280_DEFAULT_ADDR _pyupm_bmp280.BME280_CHIPID_swigconstant(_pyupm_bmp280) BME280_CHIPID = _pyupm_bmp280.BME280_CHIPID _pyupm_bmp280.BMP280_SEA_LEVEL_HPA_swigconstant(_pyupm_bmp280) BMP280_SEA_LEVEL_HPA = _pyupm_bmp280.BMP280_SEA_LEVEL_HPA _pyupm_bmp280.BMP280_RESET_BYTE_swigconstant(_pyupm_bmp280) BMP280_RESET_BYTE = _pyupm_bmp280.BMP280_RESET_BYTE _pyupm_bmp280.BMP280_REG_CALIB00_swigconstant(_pyupm_bmp280) BMP280_REG_CALIB00 = _pyupm_bmp280.BMP280_REG_CALIB00 _pyupm_bmp280.BMP280_REG_CALIB01_swigconstant(_pyupm_bmp280) BMP280_REG_CALIB01 = _pyupm_bmp280.BMP280_REG_CALIB01 _pyupm_bmp280.BMP280_REG_CALIB02_swigconstant(_pyupm_bmp280) BMP280_REG_CALIB02 = _pyupm_bmp280.BMP280_REG_CALIB02 _pyupm_bmp280.BMP280_REG_CALIB03_swigconstant(_pyupm_bmp280) BMP280_REG_CALIB03 = _pyupm_bmp280.BMP280_REG_CALIB03 _pyupm_bmp280.BMP280_REG_CALIB04_swigconstant(_pyupm_bmp280) BMP280_REG_CALIB04 = _pyupm_bmp280.BMP280_REG_CALIB04 _pyupm_bmp280.BMP280_REG_CALIB05_swigconstant(_pyupm_bmp280) BMP280_REG_CALIB05 = _pyupm_bmp280.BMP280_REG_CALIB05 _pyupm_bmp280.BMP280_REG_CALIB06_swigconstant(_pyupm_bmp280) BMP280_REG_CALIB06 = _pyupm_bmp280.BMP280_REG_CALIB06 _pyupm_bmp280.BMP280_REG_CALIB07_swigconstant(_pyupm_bmp280) BMP280_REG_CALIB07 = _pyupm_bmp280.BMP280_REG_CALIB07 _pyupm_bmp280.BMP280_REG_CALIB08_swigconstant(_pyupm_bmp280) BMP280_REG_CALIB08 = _pyupm_bmp280.BMP280_REG_CALIB08 _pyupm_bmp280.BMP280_REG_CALIB09_swigconstant(_pyupm_bmp280) BMP280_REG_CALIB09 = _pyupm_bmp280.BMP280_REG_CALIB09 _pyupm_bmp280.BMP280_REG_CALIB10_swigconstant(_pyupm_bmp280) BMP280_REG_CALIB10 = _pyupm_bmp280.BMP280_REG_CALIB10 _pyupm_bmp280.BMP280_REG_CALIB11_swigconstant(_pyupm_bmp280) BMP280_REG_CALIB11 = _pyupm_bmp280.BMP280_REG_CALIB11 _pyupm_bmp280.BMP280_REG_CALIB12_swigconstant(_pyupm_bmp280) BMP280_REG_CALIB12 = _pyupm_bmp280.BMP280_REG_CALIB12 _pyupm_bmp280.BMP280_REG_CALIB13_swigconstant(_pyupm_bmp280) BMP280_REG_CALIB13 = _pyupm_bmp280.BMP280_REG_CALIB13 _pyupm_bmp280.BMP280_REG_CALIB14_swigconstant(_pyupm_bmp280) BMP280_REG_CALIB14 = _pyupm_bmp280.BMP280_REG_CALIB14 _pyupm_bmp280.BMP280_REG_CALIB15_swigconstant(_pyupm_bmp280) BMP280_REG_CALIB15 = _pyupm_bmp280.BMP280_REG_CALIB15 _pyupm_bmp280.BMP280_REG_CALIB16_swigconstant(_pyupm_bmp280) BMP280_REG_CALIB16 = _pyupm_bmp280.BMP280_REG_CALIB16 _pyupm_bmp280.BMP280_REG_CALIB17_swigconstant(_pyupm_bmp280) BMP280_REG_CALIB17 = _pyupm_bmp280.BMP280_REG_CALIB17 _pyupm_bmp280.BMP280_REG_CALIB18_swigconstant(_pyupm_bmp280) BMP280_REG_CALIB18 = _pyupm_bmp280.BMP280_REG_CALIB18 _pyupm_bmp280.BMP280_REG_CALIB19_swigconstant(_pyupm_bmp280) BMP280_REG_CALIB19 = _pyupm_bmp280.BMP280_REG_CALIB19 _pyupm_bmp280.BMP280_REG_CALIB20_swigconstant(_pyupm_bmp280) BMP280_REG_CALIB20 = _pyupm_bmp280.BMP280_REG_CALIB20 _pyupm_bmp280.BMP280_REG_CALIB21_swigconstant(_pyupm_bmp280) BMP280_REG_CALIB21 = _pyupm_bmp280.BMP280_REG_CALIB21 _pyupm_bmp280.BMP280_REG_CALIB22_swigconstant(_pyupm_bmp280) BMP280_REG_CALIB22 = _pyupm_bmp280.BMP280_REG_CALIB22 _pyupm_bmp280.BMP280_REG_CALIB23_swigconstant(_pyupm_bmp280) BMP280_REG_CALIB23 = _pyupm_bmp280.BMP280_REG_CALIB23 _pyupm_bmp280.BMP280_REG_CALIB24_swigconstant(_pyupm_bmp280) BMP280_REG_CALIB24 = _pyupm_bmp280.BMP280_REG_CALIB24 _pyupm_bmp280.BMP280_REG_CALIB25_swigconstant(_pyupm_bmp280) BMP280_REG_CALIB25 = _pyupm_bmp280.BMP280_REG_CALIB25 _pyupm_bmp280.BMP280_REG_CHIPID_swigconstant(_pyupm_bmp280) BMP280_REG_CHIPID = _pyupm_bmp280.BMP280_REG_CHIPID _pyupm_bmp280.BMP280_REG_RESET_swigconstant(_pyupm_bmp280) BMP280_REG_RESET = _pyupm_bmp280.BMP280_REG_RESET _pyupm_bmp280.BMP280_REG_STATUS_swigconstant(_pyupm_bmp280) BMP280_REG_STATUS = _pyupm_bmp280.BMP280_REG_STATUS _pyupm_bmp280.BMP280_REG_CTRL_MEAS_swigconstant(_pyupm_bmp280) BMP280_REG_CTRL_MEAS = _pyupm_bmp280.BMP280_REG_CTRL_MEAS _pyupm_bmp280.BMP280_REG_CONFIG_swigconstant(_pyupm_bmp280) BMP280_REG_CONFIG = _pyupm_bmp280.BMP280_REG_CONFIG _pyupm_bmp280.BMP280_REG_PRESSURE_MSB_swigconstant(_pyupm_bmp280) BMP280_REG_PRESSURE_MSB = _pyupm_bmp280.BMP280_REG_PRESSURE_MSB _pyupm_bmp280.BMP280_REG_PRESSURE_LSB_swigconstant(_pyupm_bmp280) BMP280_REG_PRESSURE_LSB = _pyupm_bmp280.BMP280_REG_PRESSURE_LSB _pyupm_bmp280.BMP280_REG_PRESSURE_XLSB_swigconstant(_pyupm_bmp280) BMP280_REG_PRESSURE_XLSB = _pyupm_bmp280.BMP280_REG_PRESSURE_XLSB _pyupm_bmp280.BMP280_REG_TEMPERATURE_MSB_swigconstant(_pyupm_bmp280) BMP280_REG_TEMPERATURE_MSB = _pyupm_bmp280.BMP280_REG_TEMPERATURE_MSB _pyupm_bmp280.BMP280_REG_TEMPERATURE_LSB_swigconstant(_pyupm_bmp280) BMP280_REG_TEMPERATURE_LSB = _pyupm_bmp280.BMP280_REG_TEMPERATURE_LSB _pyupm_bmp280.BMP280_REG_TEMPERATURE_XLSB_swigconstant(_pyupm_bmp280) BMP280_REG_TEMPERATURE_XLSB = _pyupm_bmp280.BMP280_REG_TEMPERATURE_XLSB _pyupm_bmp280.BMP280_CONFIG_SPI3W_EN_swigconstant(_pyupm_bmp280) BMP280_CONFIG_SPI3W_EN = _pyupm_bmp280.BMP280_CONFIG_SPI3W_EN _pyupm_bmp280.BMP280_CONFIG_FILTER0_swigconstant(_pyupm_bmp280) BMP280_CONFIG_FILTER0 = _pyupm_bmp280.BMP280_CONFIG_FILTER0 _pyupm_bmp280.BMP280_CONFIG_FILTER1_swigconstant(_pyupm_bmp280) BMP280_CONFIG_FILTER1 = _pyupm_bmp280.BMP280_CONFIG_FILTER1 _pyupm_bmp280.BMP280_CONFIG_FILTER2_swigconstant(_pyupm_bmp280) BMP280_CONFIG_FILTER2 = _pyupm_bmp280.BMP280_CONFIG_FILTER2 _pyupm_bmp280._BMP280_CONFIG_FILTER_MASK_swigconstant(_pyupm_bmp280) _BMP280_CONFIG_FILTER_MASK = _pyupm_bmp280._BMP280_CONFIG_FILTER_MASK _pyupm_bmp280._BMP280_CONFIG_FILTER_SHIFT_swigconstant(_pyupm_bmp280) _BMP280_CONFIG_FILTER_SHIFT = _pyupm_bmp280._BMP280_CONFIG_FILTER_SHIFT _pyupm_bmp280.BMP280_CONFIG_T_SB0_swigconstant(_pyupm_bmp280) BMP280_CONFIG_T_SB0 = _pyupm_bmp280.BMP280_CONFIG_T_SB0 _pyupm_bmp280.BMP280_CONFIG_T_SB1_swigconstant(_pyupm_bmp280) BMP280_CONFIG_T_SB1 = _pyupm_bmp280.BMP280_CONFIG_T_SB1 _pyupm_bmp280.BMP280_CONFIG_T_SB2_swigconstant(_pyupm_bmp280) BMP280_CONFIG_T_SB2 = _pyupm_bmp280.BMP280_CONFIG_T_SB2 _pyupm_bmp280._BMP280_CONFIG_T_SB_MASK_swigconstant(_pyupm_bmp280) _BMP280_CONFIG_T_SB_MASK = _pyupm_bmp280._BMP280_CONFIG_T_SB_MASK _pyupm_bmp280._BMP280_CONFIG_T_SB_SHIFT_swigconstant(_pyupm_bmp280) _BMP280_CONFIG_T_SB_SHIFT = _pyupm_bmp280._BMP280_CONFIG_T_SB_SHIFT _pyupm_bmp280.BMP280_FILTER_OFF_swigconstant(_pyupm_bmp280) BMP280_FILTER_OFF = _pyupm_bmp280.BMP280_FILTER_OFF _pyupm_bmp280.BMP280_FILTER_2_swigconstant(_pyupm_bmp280) BMP280_FILTER_2 = _pyupm_bmp280.BMP280_FILTER_2 _pyupm_bmp280.BMP280_FILTER_4_swigconstant(_pyupm_bmp280) BMP280_FILTER_4 = _pyupm_bmp280.BMP280_FILTER_4 _pyupm_bmp280.BMP280_FILTER_8_swigconstant(_pyupm_bmp280) BMP280_FILTER_8 = _pyupm_bmp280.BMP280_FILTER_8 _pyupm_bmp280.BMP280_FILTER_16_swigconstant(_pyupm_bmp280) BMP280_FILTER_16 = _pyupm_bmp280.BMP280_FILTER_16 _pyupm_bmp280.BMP280_T_SB_0_5_swigconstant(_pyupm_bmp280) BMP280_T_SB_0_5 = _pyupm_bmp280.BMP280_T_SB_0_5 _pyupm_bmp280.BMP280_T_SB_62_5_swigconstant(_pyupm_bmp280) BMP280_T_SB_62_5 = _pyupm_bmp280.BMP280_T_SB_62_5 _pyupm_bmp280.BMP280_T_SB_125_swigconstant(_pyupm_bmp280) BMP280_T_SB_125 = _pyupm_bmp280.BMP280_T_SB_125 _pyupm_bmp280.BMP280_T_SB_250_swigconstant(_pyupm_bmp280) BMP280_T_SB_250 = _pyupm_bmp280.BMP280_T_SB_250 _pyupm_bmp280.BMP280_T_SB_500_swigconstant(_pyupm_bmp280) BMP280_T_SB_500 = _pyupm_bmp280.BMP280_T_SB_500 _pyupm_bmp280.BMP280_T_SB_1000_swigconstant(_pyupm_bmp280) BMP280_T_SB_1000 = _pyupm_bmp280.BMP280_T_SB_1000 _pyupm_bmp280.BMP280_T_SB_2000_swigconstant(_pyupm_bmp280) BMP280_T_SB_2000 = _pyupm_bmp280.BMP280_T_SB_2000 _pyupm_bmp280.BMP280_T_SB_4000_swigconstant(_pyupm_bmp280) BMP280_T_SB_4000 = _pyupm_bmp280.BMP280_T_SB_4000 _pyupm_bmp280.BMP280_CTRL_MEAS_MODE0_swigconstant(_pyupm_bmp280) BMP280_CTRL_MEAS_MODE0 = _pyupm_bmp280.BMP280_CTRL_MEAS_MODE0 _pyupm_bmp280.BMP280_CTRL_MEAS_MODE1_swigconstant(_pyupm_bmp280) BMP280_CTRL_MEAS_MODE1 = _pyupm_bmp280.BMP280_CTRL_MEAS_MODE1 _pyupm_bmp280._BMP280_CTRL_MEAS_MODE_MASK_swigconstant(_pyupm_bmp280) _BMP280_CTRL_MEAS_MODE_MASK = _pyupm_bmp280._BMP280_CTRL_MEAS_MODE_MASK _pyupm_bmp280._BMP280_CTRL_MEAS_MODE_SHIFT_swigconstant(_pyupm_bmp280) _BMP280_CTRL_MEAS_MODE_SHIFT = _pyupm_bmp280._BMP280_CTRL_MEAS_MODE_SHIFT _pyupm_bmp280.BMP280_CTRL_MEAS_OSRS_P0_swigconstant(_pyupm_bmp280) BMP280_CTRL_MEAS_OSRS_P0 = _pyupm_bmp280.BMP280_CTRL_MEAS_OSRS_P0 _pyupm_bmp280.BMP280_CTRL_MEAS_OSRS_P1_swigconstant(_pyupm_bmp280) BMP280_CTRL_MEAS_OSRS_P1 = _pyupm_bmp280.BMP280_CTRL_MEAS_OSRS_P1 _pyupm_bmp280.BMP280_CTRL_MEAS_OSRS_P2_swigconstant(_pyupm_bmp280) BMP280_CTRL_MEAS_OSRS_P2 = _pyupm_bmp280.BMP280_CTRL_MEAS_OSRS_P2 _pyupm_bmp280._BMP280_CTRL_MEAS_OSRS_P_MASK_swigconstant(_pyupm_bmp280) _BMP280_CTRL_MEAS_OSRS_P_MASK = _pyupm_bmp280._BMP280_CTRL_MEAS_OSRS_P_MASK _pyupm_bmp280._BMP280_CTRL_MEAS_OSRS_P_SHIFT_swigconstant(_pyupm_bmp280) _BMP280_CTRL_MEAS_OSRS_P_SHIFT = _pyupm_bmp280._BMP280_CTRL_MEAS_OSRS_P_SHIFT _pyupm_bmp280.BMP280_CTRL_MEAS_OSRS_T0_swigconstant(_pyupm_bmp280) BMP280_CTRL_MEAS_OSRS_T0 = _pyupm_bmp280.BMP280_CTRL_MEAS_OSRS_T0 _pyupm_bmp280.BMP280_CTRL_MEAS_OSRS_T1_swigconstant(_pyupm_bmp280) BMP280_CTRL_MEAS_OSRS_T1 = _pyupm_bmp280.BMP280_CTRL_MEAS_OSRS_T1 _pyupm_bmp280.BMP280_CTRL_MEAS_OSRS_T2_swigconstant(_pyupm_bmp280) BMP280_CTRL_MEAS_OSRS_T2 = _pyupm_bmp280.BMP280_CTRL_MEAS_OSRS_T2 _pyupm_bmp280._BMP280_CTRL_MEAS_OSRS_T_MASK_swigconstant(_pyupm_bmp280) _BMP280_CTRL_MEAS_OSRS_T_MASK = _pyupm_bmp280._BMP280_CTRL_MEAS_OSRS_T_MASK _pyupm_bmp280._BMP280_CTRL_MEAS_OSRS_T_SHIFT_swigconstant(_pyupm_bmp280) _BMP280_CTRL_MEAS_OSRS_T_SHIFT = _pyupm_bmp280._BMP280_CTRL_MEAS_OSRS_T_SHIFT _pyupm_bmp280.BMP280_MODE_SLEEP_swigconstant(_pyupm_bmp280) BMP280_MODE_SLEEP = _pyupm_bmp280.BMP280_MODE_SLEEP _pyupm_bmp280.BMP280_MODE_FORCED_swigconstant(_pyupm_bmp280) BMP280_MODE_FORCED = _pyupm_bmp280.BMP280_MODE_FORCED _pyupm_bmp280.BMP280_MODE_NORMAL_swigconstant(_pyupm_bmp280) BMP280_MODE_NORMAL = _pyupm_bmp280.BMP280_MODE_NORMAL _pyupm_bmp280.BMP280_OSRS_P_SKIPPED_swigconstant(_pyupm_bmp280) BMP280_OSRS_P_SKIPPED = _pyupm_bmp280.BMP280_OSRS_P_SKIPPED _pyupm_bmp280.BMP280_OSRS_P_OVERSAMPLING_1_swigconstant(_pyupm_bmp280) BMP280_OSRS_P_OVERSAMPLING_1 = _pyupm_bmp280.BMP280_OSRS_P_OVERSAMPLING_1 _pyupm_bmp280.BMP280_OSRS_P_OVERSAMPLING_2_swigconstant(_pyupm_bmp280) BMP280_OSRS_P_OVERSAMPLING_2 = _pyupm_bmp280.BMP280_OSRS_P_OVERSAMPLING_2 _pyupm_bmp280.BMP280_OSRS_P_OVERSAMPLING_4_swigconstant(_pyupm_bmp280) BMP280_OSRS_P_OVERSAMPLING_4 = _pyupm_bmp280.BMP280_OSRS_P_OVERSAMPLING_4 _pyupm_bmp280.BMP280_OSRS_P_OVERSAMPLING_8_swigconstant(_pyupm_bmp280) BMP280_OSRS_P_OVERSAMPLING_8 = _pyupm_bmp280.BMP280_OSRS_P_OVERSAMPLING_8 _pyupm_bmp280.BMP280_OSRS_P_OVERSAMPLING_16_swigconstant(_pyupm_bmp280) BMP280_OSRS_P_OVERSAMPLING_16 = _pyupm_bmp280.BMP280_OSRS_P_OVERSAMPLING_16 _pyupm_bmp280.BMP280_OSRS_T_SKIPPED_swigconstant(_pyupm_bmp280) BMP280_OSRS_T_SKIPPED = _pyupm_bmp280.BMP280_OSRS_T_SKIPPED _pyupm_bmp280.BMP280_OSRS_T_OVERSAMPLING_1_swigconstant(_pyupm_bmp280) BMP280_OSRS_T_OVERSAMPLING_1 = _pyupm_bmp280.BMP280_OSRS_T_OVERSAMPLING_1 _pyupm_bmp280.BMP280_OSRS_T_OVERSAMPLING_2_swigconstant(_pyupm_bmp280) BMP280_OSRS_T_OVERSAMPLING_2 = _pyupm_bmp280.BMP280_OSRS_T_OVERSAMPLING_2 _pyupm_bmp280.BMP280_OSRS_T_OVERSAMPLING_4_swigconstant(_pyupm_bmp280) BMP280_OSRS_T_OVERSAMPLING_4 = _pyupm_bmp280.BMP280_OSRS_T_OVERSAMPLING_4 _pyupm_bmp280.BMP280_OSRS_T_OVERSAMPLING_8_swigconstant(_pyupm_bmp280) BMP280_OSRS_T_OVERSAMPLING_8 = _pyupm_bmp280.BMP280_OSRS_T_OVERSAMPLING_8 _pyupm_bmp280.BMP280_OSRS_T_OVERSAMPLING_16_swigconstant(_pyupm_bmp280) BMP280_OSRS_T_OVERSAMPLING_16 = _pyupm_bmp280.BMP280_OSRS_T_OVERSAMPLING_16 _pyupm_bmp280.BMP280_STATUS_IM_UPDATE_swigconstant(_pyupm_bmp280) BMP280_STATUS_IM_UPDATE = _pyupm_bmp280.BMP280_STATUS_IM_UPDATE _pyupm_bmp280.BMP280_STATUS_MEASURING_swigconstant(_pyupm_bmp280) BMP280_STATUS_MEASURING = _pyupm_bmp280.BMP280_STATUS_MEASURING _pyupm_bmp280.BMP280_USAGE_MODE_HANDHELD_LOW_POWER_swigconstant(_pyupm_bmp280) BMP280_USAGE_MODE_HANDHELD_LOW_POWER = _pyupm_bmp280.BMP280_USAGE_MODE_HANDHELD_LOW_POWER _pyupm_bmp280.BMP280_USAGE_MODE_HANDHELD_DYNAMIC_swigconstant(_pyupm_bmp280) BMP280_USAGE_MODE_HANDHELD_DYNAMIC = _pyupm_bmp280.BMP280_USAGE_MODE_HANDHELD_DYNAMIC _pyupm_bmp280.BMP280_USAGE_MODE_WEATHER_MONITOR_swigconstant(_pyupm_bmp280) BMP280_USAGE_MODE_WEATHER_MONITOR = _pyupm_bmp280.BMP280_USAGE_MODE_WEATHER_MONITOR _pyupm_bmp280.BMP280_USAGE_MODE_FLOOR_CHG_DETECT_swigconstant(_pyupm_bmp280) BMP280_USAGE_MODE_FLOOR_CHG_DETECT = _pyupm_bmp280.BMP280_USAGE_MODE_FLOOR_CHG_DETECT _pyupm_bmp280.BMP280_USAGE_MODE_DROP_DETECT_swigconstant(_pyupm_bmp280) BMP280_USAGE_MODE_DROP_DETECT = _pyupm_bmp280.BMP280_USAGE_MODE_DROP_DETECT _pyupm_bmp280.BMP280_USAGE_MODE_INDOOR_NAV_swigconstant(_pyupm_bmp280) BMP280_USAGE_MODE_INDOOR_NAV = _pyupm_bmp280.BMP280_USAGE_MODE_INDOOR_NAV _pyupm_bmp280.BME280_REG_CALIB_DIG_H1_swigconstant(_pyupm_bmp280) BME280_REG_CALIB_DIG_H1 = _pyupm_bmp280.BME280_REG_CALIB_DIG_H1 _pyupm_bmp280.BME280_REG_CALIB_DIG_H2_LSB_swigconstant(_pyupm_bmp280) BME280_REG_CALIB_DIG_H2_LSB = _pyupm_bmp280.BME280_REG_CALIB_DIG_H2_LSB _pyupm_bmp280.BME280_REG_CALIB_DIG_H2_MSB_swigconstant(_pyupm_bmp280) BME280_REG_CALIB_DIG_H2_MSB = _pyupm_bmp280.BME280_REG_CALIB_DIG_H2_MSB _pyupm_bmp280.BME280_REG_CALIB_DIG_H3_swigconstant(_pyupm_bmp280) BME280_REG_CALIB_DIG_H3 = _pyupm_bmp280.BME280_REG_CALIB_DIG_H3 _pyupm_bmp280.BME280_REG_CALIB_DIG_H4_0_swigconstant(_pyupm_bmp280) BME280_REG_CALIB_DIG_H4_0 = _pyupm_bmp280.BME280_REG_CALIB_DIG_H4_0 _pyupm_bmp280.BME280_REG_CALIB_DIG_H4_1_swigconstant(_pyupm_bmp280) BME280_REG_CALIB_DIG_H4_1 = _pyupm_bmp280.BME280_REG_CALIB_DIG_H4_1 _pyupm_bmp280.BME280_REG_CALIB_DIG_H5_0_swigconstant(_pyupm_bmp280) BME280_REG_CALIB_DIG_H5_0 = _pyupm_bmp280.BME280_REG_CALIB_DIG_H5_0 _pyupm_bmp280.BME280_REG_CALIB_DIG_H5_1_swigconstant(_pyupm_bmp280) BME280_REG_CALIB_DIG_H5_1 = _pyupm_bmp280.BME280_REG_CALIB_DIG_H5_1 _pyupm_bmp280.BME280_REG_CALIB_DIG_H6_swigconstant(_pyupm_bmp280) BME280_REG_CALIB_DIG_H6 = _pyupm_bmp280.BME280_REG_CALIB_DIG_H6 _pyupm_bmp280.BME280_REG_CTRL_HUM_swigconstant(_pyupm_bmp280) BME280_REG_CTRL_HUM = _pyupm_bmp280.BME280_REG_CTRL_HUM _pyupm_bmp280.BME280_REG_HUMIDITY_MSB_swigconstant(_pyupm_bmp280) BME280_REG_HUMIDITY_MSB = _pyupm_bmp280.BME280_REG_HUMIDITY_MSB _pyupm_bmp280.BME280_REG_HUMIDITY_LSB_swigconstant(_pyupm_bmp280) BME280_REG_HUMIDITY_LSB = _pyupm_bmp280.BME280_REG_HUMIDITY_LSB _pyupm_bmp280.BME280_CTRL_HUM_OSRS_H0_swigconstant(_pyupm_bmp280) BME280_CTRL_HUM_OSRS_H0 = _pyupm_bmp280.BME280_CTRL_HUM_OSRS_H0 _pyupm_bmp280.BME280_CTRL_HUM_OSRS_H1_swigconstant(_pyupm_bmp280) BME280_CTRL_HUM_OSRS_H1 = _pyupm_bmp280.BME280_CTRL_HUM_OSRS_H1 _pyupm_bmp280.BME280_CTRL_HUM_OSRS_H2_swigconstant(_pyupm_bmp280) BME280_CTRL_HUM_OSRS_H2 = _pyupm_bmp280.BME280_CTRL_HUM_OSRS_H2 _pyupm_bmp280._BME280_CTRL_HUM_OSRS_H_MASK_swigconstant(_pyupm_bmp280) _BME280_CTRL_HUM_OSRS_H_MASK = _pyupm_bmp280._BME280_CTRL_HUM_OSRS_H_MASK _pyupm_bmp280._BME280_CTRL_HUM_OSRS_H_SHIFT_swigconstant(_pyupm_bmp280) _BME280_CTRL_HUM_OSRS_H_SHIFT = _pyupm_bmp280._BME280_CTRL_HUM_OSRS_H_SHIFT _pyupm_bmp280.BME280_OSRS_H_SKIPPED_swigconstant(_pyupm_bmp280) BME280_OSRS_H_SKIPPED = _pyupm_bmp280.BME280_OSRS_H_SKIPPED _pyupm_bmp280.BME280_OSRS_H_OVERSAMPLING_1_swigconstant(_pyupm_bmp280) BME280_OSRS_H_OVERSAMPLING_1 = _pyupm_bmp280.BME280_OSRS_H_OVERSAMPLING_1 _pyupm_bmp280.BME280_OSRS_H_OVERSAMPLING_2_swigconstant(_pyupm_bmp280) BME280_OSRS_H_OVERSAMPLING_2 = _pyupm_bmp280.BME280_OSRS_H_OVERSAMPLING_2 _pyupm_bmp280.BME280_OSRS_H_OVERSAMPLING_4_swigconstant(_pyupm_bmp280) BME280_OSRS_H_OVERSAMPLING_4 = _pyupm_bmp280.BME280_OSRS_H_OVERSAMPLING_4 _pyupm_bmp280.BME280_OSRS_H_OVERSAMPLING_8_swigconstant(_pyupm_bmp280) BME280_OSRS_H_OVERSAMPLING_8 = _pyupm_bmp280.BME280_OSRS_H_OVERSAMPLING_8 _pyupm_bmp280.BME280_OSRS_H_OVERSAMPLING_16_swigconstant(_pyupm_bmp280) BME280_OSRS_H_OVERSAMPLING_16 = _pyupm_bmp280.BME280_OSRS_H_OVERSAMPLING_16
[docs]class BMP280(ITemperatureSensor, IPressureSensor): """ API for the BMP280 Digital Pressure Sensor. ID: bmp280 Name: Digital Pressure Sensor Category: pressure Manufacturer: bosch adafruit Connection: i2c spi gpio Link:https://www.adafruit.com/products/2651 The BMP280 is an absolute barometric pressure sensor especially designed for mobile applications. The sensor module is housed in an extremely compact 8-pin metal-lid LGA package with a footprint of only 2.0 * 2.5 mm2 and 0.95 mm package height. Its small dimensions and its low power consumption of 2.7 uA @1Hz allow the implementation in battery driven devices such as mobile phones, GPS modules or watches. As the successor to the widely adopted BMP180, the BMP280 delivers high performance in all applications that require precise pressure measurement. The BMP280 operates at lower noise, supports new filter modes and an SPI interface within a footprint 63% smaller than the BMP180. C++ includes: bmp280.hpp """ __swig_setmethods__ = {} for _s in [ITemperatureSensor, IPressureSensor]: __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {})) __setattr__ = lambda self, name, value: _swig_setattr(self, BMP280, name, value) __swig_getmethods__ = {} for _s in [ITemperatureSensor, IPressureSensor]: __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {})) __getattr__ = lambda self, name: _swig_getattr(self, BMP280, name) __repr__ = _swig_repr def __init__(self, bus=0, addr=0x77, cs=-1): """ BMP280(int bus=BMP280_DEFAULT_I2C_BUS, int addr=BMP280_DEFAULT_ADDR, int cs=-1) BMP280 constructor. This driver supports both the BMP280 and the BME280. The BME280 adds a humidity sensor. The device type is detected automatically by querying the chip id register. This device can support both I2C and SPI. For SPI, set the addr to -1, and specify a positive integer representing the Chip Select (CS) pin for the cs argument. If you are using a hardware CS pin, then you can connect the proper pin to the hardware CS pin on your MCU and supply -1 for cs. The default operating mode is I2C. Parameters: ----------- bus: I2C or SPI bus to use. addr: The I2C address for this device. Use -1 for SPI. cs: The gpio pin to use for the SPI Chip Select. Use -1 for I2C, or for SPI with a hardware controlled pin. Exceptions: ----------- std::runtime_error: on failure. """ this = _pyupm_bmp280.new_BMP280(bus, addr, cs) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _pyupm_bmp280.delete_BMP280 __del__ = lambda self: None
[docs] def update(self): """ void update() Update the internal stored values from sensor data. Exceptions: ----------- std::runtime_error: on failure. """ return _pyupm_bmp280.BMP280_update(self)
[docs] def getChipID(self): """ uint8_t getChipID() Return the chip ID. The chip ID (BMP280_CHIPID). """ return _pyupm_bmp280.BMP280_getChipID(self)
[docs] def reset(self): """ void reset() Reset the sensor, as if by a power-on-reset. """ return _pyupm_bmp280.BMP280_reset(self)
[docs] def getTemperature(self, fahrenheit=False): """ float getTemperature(bool fahrenheit=false) Return the current measured temperature. Note, this is not ambient temperature - this is the temperature used to fine tune the pressure measurement. update() must have been called prior to calling this method. Parameters: ----------- fahrenheit: true to return data in Fahrenheit, false for Celicus. Celsius is the default. The temperature in degrees Celsius or Fahrenheit. """ return _pyupm_bmp280.BMP280_getTemperature(self, fahrenheit)
[docs] def getPressure(self): """ float getPressure() Return the current measured pressure in Pascals (Pa). update() must have been called prior to calling this method. The pressure in Pascals (Pa). """ return _pyupm_bmp280.BMP280_getPressure(self)
[docs] def setSeaLevelPreassure(self, seaLevelhPA=1013.25): """ void setSeaLevelPreassure(float seaLevelhPA=1013.25) Set the pressure at sea level in hecto-Pascals (hPA). This value is used to compute the altitude based on the pressure. At driver initialization time, this value is set to 1013.25 hPA. Parameters: ----------- seaLevelhPA: The pressure at sea level in hectoPascals (hPa). The default is 1013.25 hPA, (101325 Pa). The computed altitude in meters. """ return _pyupm_bmp280.BMP280_setSeaLevelPreassure(self, seaLevelhPA)
[docs] def getAltitude(self): """ float getAltitude() Return the current computed altitude in meters. update() must have been called prior to calling this method. The computed altitude in meters. """ return _pyupm_bmp280.BMP280_getAltitude(self)
[docs] def setUsageMode(self, mode): """ void setUsageMode(BMP280_USAGE_MODE_T mode) Set a general usage mode. This function can be used to configure the filters and oversampling for a particular use case. These setting are documented in the BMP280 datasheet. The default mode set in the constructor is USAGE_MODE_INDOOR_NAV, the highest resolution mode. Parameters: ----------- mode: One of the BMP280_USAGE_MODE_T values. """ return _pyupm_bmp280.BMP280_setUsageMode(self, mode)
[docs] def setOversampleRateTemperature(self, rate): """ void setOversampleRateTemperature(BMP280_OSRS_T_T rate) Set the temperature sensor oversampling parameter. See the data sheet for details. This value can be automatically set to a suitable value by using one of the predefined modes for setUsageMode(). Parameters: ----------- rate: One of the BMP280_OSRS_T_T values. """ return _pyupm_bmp280.BMP280_setOversampleRateTemperature(self, rate)
[docs] def setOversampleRatePressure(self, rate): """ void setOversampleRatePressure(BMP280_OSRS_P_T rate) Set the pressure sensor oversampling parameter. See the data sheet for details. This value can be automatically set to a suitable value by using one of the predefined modes for setUsageMode(). Parameters: ----------- rate: One of the BMP280_OSRS_P_T values. """ return _pyupm_bmp280.BMP280_setOversampleRatePressure(self, rate)
[docs] def setTimerStandby(self, tsb): """ void setTimerStandby(BMP280_T_SB_T tsb) Set the timer standby value. When in NORMAL operating mode, this timer governs how long the chip will wait before performing a measurement. See the data sheet for details. Parameters: ----------- tsb: One of the BMP280_T_SB_T values. """ return _pyupm_bmp280.BMP280_setTimerStandby(self, tsb)
[docs] def setFilter(self, filter): """ void setFilter(BMP280_FILTER_T filter) Set the IIR filtering parameter. See the data sheet for details. This value can be automatically set to a suitable value by using one of the predefined modes for setUsageMode(). Parameters: ----------- filter: One of the BMP280_FILTER_T values. """ return _pyupm_bmp280.BMP280_setFilter(self, filter)
[docs] def setMeasureMode(self, mode): """ void setMeasureMode(BMP280_MODES_T mode) Set the default measuring mode. Basic values are forced, sleep, and normal. See the data sheet for details. This value can be automatically set to a suitable value by using one of the predefined modes for setUsageMode(). Parameters: ----------- mode: One of the BMP280_MODES_T values. """ return _pyupm_bmp280.BMP280_setMeasureMode(self, mode)
[docs] def getModuleName(self): """ const char* getModuleName() Returns name of module. This is the string in library name after libupm_ name of module """ return _pyupm_bmp280.BMP280_getModuleName(self)
[docs] def getTemperatureCelsius(self): """ int getTemperatureCelsius() """ return _pyupm_bmp280.BMP280_getTemperatureCelsius(self)
[docs] def getPressurePa(self): """ int getPressurePa() """ return _pyupm_bmp280.BMP280_getPressurePa(self)
BMP280_swigregister = _pyupm_bmp280.BMP280_swigregister BMP280_swigregister(BMP280)
[docs]class BME280(BMP280, IHumiditySensor): """ API for the BME280 Digital Humidity, Pressure, and Temperature Sensor. ID: bme280 Name: Digital Humidity, Pressure, and Temperature Sensor Category: pressure humidity Manufacturer: bosch adafruit Connection: i2c spi gpio Link:https://www.adafruit.com/products/2652 The BME280 is as combined digital humidity, pressure and temperature sensor based on proven sensing principles. The sensor module is housed in an extremely compact metal-lid LGA package with a footprint of only 2.5 * 2.5 mm2 with a height of 0.93 mm. Its small dimensions and its low power consumption allow the implementation in battery driven devices such as handsets, GPS modules or watches. The BME280 is register and performance compatible to the Bosch Sensortec BMP280 digital pressure sensor. C++ includes: bme280.hpp """ __swig_setmethods__ = {} for _s in [BMP280, IHumiditySensor]: __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {})) __setattr__ = lambda self, name, value: _swig_setattr(self, BME280, name, value) __swig_getmethods__ = {} for _s in [BMP280, IHumiditySensor]: __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {})) __getattr__ = lambda self, name: _swig_getattr(self, BME280, name) __repr__ = _swig_repr def __init__(self, bus=0, addr=0x77, cs=-1): """ BME280(int bus=BME280_DEFAULT_I2C_BUS, int addr=BME280_DEFAULT_ADDR, int cs=-1) BME280 constructor. This driver supports both the BMP280 and the BME280. The BME280 adds a humidity sensor. The device type is detected automatically by querying the chip id register. This device can support both I2C and SPI. For SPI, set the addr to -1, and specify a positive integer representing the Chip Select (CS) pin for the cs argument. If you are using a hardware CS pin, then you can connect the proper pin to the hardware CS pin on your MCU and supply -1 for cs. The default operating mode is I2C. Parameters: ----------- bus: I2C or SPI bus to use. addr: The I2C address for this device. Use -1 for SPI. cs: The gpio pin to use for the SPI Chip Select. Use -1 for I2C, or for SPI with a hardware controlled pin. Exceptions: ----------- std::runtime_error: on failure. """ this = _pyupm_bmp280.new_BME280(bus, addr, cs) try: self.this.append(this) except Exception: self.this = this __swig_destroy__ = _pyupm_bmp280.delete_BME280 __del__ = lambda self: None
[docs] def getHumidity(self): """ float getHumidity() Return the current measured relative humidity. update() must have been called prior to calling this method. If the device is a bmp280 rather than a bme280, this method will always return 0. The relative humidity in percent. """ return _pyupm_bmp280.BME280_getHumidity(self)
[docs] def setOversampleRateHumidity(self, rate): """ void setOversampleRateHumidity(BME280_OSRS_H_T rate) Set the humidity sensor oversampling parameter. See the data sheet for details. This value can be automatically set to a suitable value by using one of the predefined modes for setUsageMode(). Parameters: ----------- rate: One of the OSRS_H_T values. """ return _pyupm_bmp280.BME280_setOversampleRateHumidity(self, rate)
[docs] def getModuleName(self): """ const char* getModuleName() Returns name of module. This is the string in library name after libupm_ name of module """ return _pyupm_bmp280.BME280_getModuleName(self)
[docs] def getHumidityRelative(self): """ int getHumidityRelative() """ return _pyupm_bmp280.BME280_getHumidityRelative(self)
BME280_swigregister = _pyupm_bmp280.BME280_swigregister BME280_swigregister(BME280) # This file is compatible with both classic and new-style classes.