# 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_max44009', [dirname(__file__)])
except ImportError:
import _pyupm_max44009
return _pyupm_max44009
if fp is not None:
try:
_mod = imp.load_module('_pyupm_max44009', fp, pathname, description)
finally:
fp.close()
return _mod
_pyupm_max44009 = swig_import_helper()
del swig_import_helper
else:
import _pyupm_max44009
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_max44009.getVersion()
getVersion = _pyupm_max44009.getVersion
_pyupm_max44009.MAX44009_ADDRESS_swigconstant(_pyupm_max44009)
MAX44009_ADDRESS = _pyupm_max44009.MAX44009_ADDRESS
_pyupm_max44009.MAX44009_NOT_FOUND_swigconstant(_pyupm_max44009)
MAX44009_NOT_FOUND = _pyupm_max44009.MAX44009_NOT_FOUND
_pyupm_max44009.MAX44009_I2C_BUS_swigconstant(_pyupm_max44009)
MAX44009_I2C_BUS = _pyupm_max44009.MAX44009_I2C_BUS
_pyupm_max44009.MAX44009_INT_STATUS_ADDR_swigconstant(_pyupm_max44009)
MAX44009_INT_STATUS_ADDR = _pyupm_max44009.MAX44009_INT_STATUS_ADDR
_pyupm_max44009.MAX44009_INT_ENABLE_ADDR_swigconstant(_pyupm_max44009)
MAX44009_INT_ENABLE_ADDR = _pyupm_max44009.MAX44009_INT_ENABLE_ADDR
_pyupm_max44009.MAX44009_CONFIG_ADDR_swigconstant(_pyupm_max44009)
MAX44009_CONFIG_ADDR = _pyupm_max44009.MAX44009_CONFIG_ADDR
_pyupm_max44009.MAX44009_LUX_START_ADDR_swigconstant(_pyupm_max44009)
MAX44009_LUX_START_ADDR = _pyupm_max44009.MAX44009_LUX_START_ADDR
_pyupm_max44009.MAX44009_LUX_LENGTH_swigconstant(_pyupm_max44009)
MAX44009_LUX_LENGTH = _pyupm_max44009.MAX44009_LUX_LENGTH
_pyupm_max44009.MAX44009_LUX_HIGH_swigconstant(_pyupm_max44009)
MAX44009_LUX_HIGH = _pyupm_max44009.MAX44009_LUX_HIGH
_pyupm_max44009.MAX44009_LUX_LOW_swigconstant(_pyupm_max44009)
MAX44009_LUX_LOW = _pyupm_max44009.MAX44009_LUX_LOW
_pyupm_max44009.MAX44009_THR_HIGH_ADDR_swigconstant(_pyupm_max44009)
MAX44009_THR_HIGH_ADDR = _pyupm_max44009.MAX44009_THR_HIGH_ADDR
_pyupm_max44009.MAX44009_THR_LOW_ADDR_swigconstant(_pyupm_max44009)
MAX44009_THR_LOW_ADDR = _pyupm_max44009.MAX44009_THR_LOW_ADDR
_pyupm_max44009.MAX44009_THR_TIMER_ADDR_swigconstant(_pyupm_max44009)
MAX44009_THR_TIMER_ADDR = _pyupm_max44009.MAX44009_THR_TIMER_ADDR
_pyupm_max44009.MAX44009_INT_STATUS_OFF_swigconstant(_pyupm_max44009)
MAX44009_INT_STATUS_OFF = _pyupm_max44009.MAX44009_INT_STATUS_OFF
_pyupm_max44009.MAX44009_INT_STATUS_ON_swigconstant(_pyupm_max44009)
MAX44009_INT_STATUS_ON = _pyupm_max44009.MAX44009_INT_STATUS_ON
_pyupm_max44009.MAX44009_INT_DISABLED_swigconstant(_pyupm_max44009)
MAX44009_INT_DISABLED = _pyupm_max44009.MAX44009_INT_DISABLED
_pyupm_max44009.MAX44009_INT_ENABLED_swigconstant(_pyupm_max44009)
MAX44009_INT_ENABLED = _pyupm_max44009.MAX44009_INT_ENABLED
_pyupm_max44009.MAX44009_CONFIG_DEFAULT_swigconstant(_pyupm_max44009)
MAX44009_CONFIG_DEFAULT = _pyupm_max44009.MAX44009_CONFIG_DEFAULT
_pyupm_max44009.MAX44009_CONFIG_CONTINUOUS_swigconstant(_pyupm_max44009)
MAX44009_CONFIG_CONTINUOUS = _pyupm_max44009.MAX44009_CONFIG_CONTINUOUS
_pyupm_max44009.MAX44009_CONFIG_AUTO_swigconstant(_pyupm_max44009)
MAX44009_CONFIG_AUTO = _pyupm_max44009.MAX44009_CONFIG_AUTO
_pyupm_max44009.MAX44009_CONFIG_MANUAL_swigconstant(_pyupm_max44009)
MAX44009_CONFIG_MANUAL = _pyupm_max44009.MAX44009_CONFIG_MANUAL
_pyupm_max44009.MAX44009_CONFIG_CDR_NORMAL_swigconstant(_pyupm_max44009)
MAX44009_CONFIG_CDR_NORMAL = _pyupm_max44009.MAX44009_CONFIG_CDR_NORMAL
_pyupm_max44009.MAX44009_CONFIG_CDR_DIVIDED_swigconstant(_pyupm_max44009)
MAX44009_CONFIG_CDR_DIVIDED = _pyupm_max44009.MAX44009_CONFIG_CDR_DIVIDED
_pyupm_max44009.MAX44009_CONFIG_INTEGRATION_800ms_swigconstant(_pyupm_max44009)
MAX44009_CONFIG_INTEGRATION_800ms = _pyupm_max44009.MAX44009_CONFIG_INTEGRATION_800ms
_pyupm_max44009.MAX44009_CONFIG_INTEGRATION_400ms_swigconstant(_pyupm_max44009)
MAX44009_CONFIG_INTEGRATION_400ms = _pyupm_max44009.MAX44009_CONFIG_INTEGRATION_400ms
_pyupm_max44009.MAX44009_CONFIG_INTEGRATION_200ms_swigconstant(_pyupm_max44009)
MAX44009_CONFIG_INTEGRATION_200ms = _pyupm_max44009.MAX44009_CONFIG_INTEGRATION_200ms
_pyupm_max44009.MAX44009_CONFIG_INTEGRATION_100ms_swigconstant(_pyupm_max44009)
MAX44009_CONFIG_INTEGRATION_100ms = _pyupm_max44009.MAX44009_CONFIG_INTEGRATION_100ms
_pyupm_max44009.MAX44009_CONFIG_INTEGRATION_50ms_swigconstant(_pyupm_max44009)
MAX44009_CONFIG_INTEGRATION_50ms = _pyupm_max44009.MAX44009_CONFIG_INTEGRATION_50ms
_pyupm_max44009.MAX44009_CONFIG_INTEGRATION_25ms_swigconstant(_pyupm_max44009)
MAX44009_CONFIG_INTEGRATION_25ms = _pyupm_max44009.MAX44009_CONFIG_INTEGRATION_25ms
_pyupm_max44009.MAX44009_CONFIG_INTEGRATION_12ms_swigconstant(_pyupm_max44009)
MAX44009_CONFIG_INTEGRATION_12ms = _pyupm_max44009.MAX44009_CONFIG_INTEGRATION_12ms
_pyupm_max44009.MAX44009_CONFIG_INTEGRATION_6ms_swigconstant(_pyupm_max44009)
MAX44009_CONFIG_INTEGRATION_6ms = _pyupm_max44009.MAX44009_CONFIG_INTEGRATION_6ms
_pyupm_max44009.MAX44009_DEFAULT_CONFIGURATION_swigconstant(_pyupm_max44009)
MAX44009_DEFAULT_CONFIGURATION = _pyupm_max44009.MAX44009_DEFAULT_CONFIGURATION
_pyupm_max44009.MAX44009_OVERRANGE_CONDITION_swigconstant(_pyupm_max44009)
MAX44009_OVERRANGE_CONDITION = _pyupm_max44009.MAX44009_OVERRANGE_CONDITION
[docs]class MAX44009(_object):
"""
C++ API for MAX44009 chip (Ambient Light Sensor)
The Maxim IntegratedMAX44009 is Industry's Lowest-Power Ambient Light
Sensor with ADC.
ID: max44009
Name: I2C Low-power Digital Ambient Light Sensor
Other Names: MAX44009
Category: light
Manufacturer: maxim
Connection: i2c
Link:https://www.maximintegrated.com/en/products/analog/sensors-and-
sensor- interface/MAX44009.html
C++ includes: max44009.hpp
"""
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, MAX44009, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, MAX44009, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
MAX44009(int
bus=MAX44009_I2C_BUS, int devAddr=MAX44009_ADDRESS)
Instanciates a MAX44009 object
Parameters:
-----------
bus: number of used bus
devAddr: address of used i2c device
"""
this = _pyupm_max44009.new_MAX44009(*args)
try:
self.this.append(this)
except Exception:
self.this = this
__swig_destroy__ = _pyupm_max44009.delete_MAX44009
__del__ = lambda self: None
[docs] def getVisibleRaw(self):
"""
uint16_t
getVisibleRaw()
Read the raw visible light value
"""
return _pyupm_max44009.MAX44009_getVisibleRaw(self)
[docs] def getVisibleLux(self):
"""
double
getVisibleLux()
Read the lux value
"""
return _pyupm_max44009.MAX44009_getVisibleLux(self)
[docs] def getModuleName(self):
"""
virtual const
char* getModuleName()
Returns name of module. This is the string in library name after
libupm_
name of module
"""
return _pyupm_max44009.MAX44009_getModuleName(self)
MAX44009_swigregister = _pyupm_max44009.MAX44009_swigregister
MAX44009_swigregister(MAX44009)
# This file is compatible with both classic and new-style classes.