Loom 4 v4.5
Arduino library for Internet of Things Rapid Prototyping in environmental sensing
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
Loom_TSL2591 Class Reference

#include <Loom_TSL2591.h>

Inheritance diagram for Loom_TSL2591:
Inheritance graph
[legend]
Collaboration diagram for Loom_TSL2591:
Collaboration graph
[legend]

Public Member Functions

 Loom_TSL2591 (Manager &man, int address=0x29, bool useMux=false, tsl2591Gain_t light_gain=TSL2591_GAIN_MED, tsl2591IntegrationTime_t integration_time=TSL2591_INTEGRATIONTIME_100MS)
 
uint16_t getVisible ()
 
uint16_t getInfrared ()
 
uint16_t getFullSpectrum ()
 
- Public Member Functions inherited from I2CDevice
 I2CDevice (const char *modName)
 
bool checkDeviceConnection ()
 
- Public Member Functions inherited from Module
 Module (const char *modName)
 
void setModuleName (const char *modName)
 
virtual const char * getModuleName ()
 
virtual void printModuleName (const char *message)
 
virtual void initialize ()=0
 
virtual void measure ()=0
 
virtual void package ()=0
 
virtual void power_up ()=0
 
virtual void power_down ()=0
 
virtual void display_data ()
 

Protected Member Functions

void measure () override
 
void initialize () override
 
void power_up () override
 
void power_down () override
 
void package () override
 

Additional Inherited Members

- Public Attributes inherited from I2CDevice
bool needsReinit = false
 
- Public Attributes inherited from Module
bool moduleInitialized = true
 
int module_address = -1
 

Detailed Description

TSL2591 Light Sensor

Author
Will Richards

Constructor & Destructor Documentation

◆ Loom_TSL2591()

Loom_TSL2591::Loom_TSL2591 ( Manager man,
int  address = 0x29,
bool  useMux = false,
tsl2591Gain_t  light_gain = TSL2591_GAIN_MED,
tsl2591IntegrationTime_t  integration_time = TSL2591_INTEGRATIONTIME_100MS 
)

Constructs a new TSL2591 sensor

Parameters
manReference to the manager that is used to universally package all data
addressI2C address that is assigned to the sensor
light_gainSets the gain level for how much to amplify the input
integration_timeHow long we want to integrate the data, longer time results in dimmer values

Member Function Documentation

◆ getFullSpectrum()

uint16_t Loom_TSL2591::getFullSpectrum ( )
inline

Get recorded full spectrum

◆ getInfrared()

uint16_t Loom_TSL2591::getInfrared ( )
inline

Get recorded infrared light

◆ getVisible()

uint16_t Loom_TSL2591::getVisible ( )
inline

Get recorded visible light

◆ initialize()

void Loom_TSL2591::initialize ( )
overrideprotectedvirtual

Implements Module.

◆ measure()

void Loom_TSL2591::measure ( )
overrideprotectedvirtual

Implements Module.

◆ package()

void Loom_TSL2591::package ( )
overrideprotectedvirtual

Implements Module.

◆ power_down()

void Loom_TSL2591::power_down ( )
inlineoverrideprotectedvirtual

Implements Module.

◆ power_up()

void Loom_TSL2591::power_up ( )
overrideprotectedvirtual

Implements Module.


The documentation for this class was generated from the following files: