Skip to content

This is a library supporting the TSL45315 ambient light sensor on the Arduino platform.

License

Notifications You must be signed in to change notification settings

LukaGitH/TSL45315_Arduino

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Basic usage

Default device address for this library is 0x29 but can be changed in the ctor.

Continuous operation

This mode can be used if you want to read the ambient light value in a loop and don't have any power consumption concerns. This is the default mode.

#include <TSL45315.h>
TSL45315 tsl;

void setup()
{
    tsl.begin();
}

void loop()
{
    uint32_t lux = tsl.readLux();
}

Discrete operation

Use this mode if you need to save power.

#include <TSL45315.h>
TSL45315 tsl;

void setup()
{
}

void loop()
{
    tsl.begin(PowerMode::SINGLE_CYCLE);
    delay($AT_LEAST_YOUR_INTEGRATION_TIME$);
    uint32_t lux = tsl.readLux();
}

About

This is a library supporting the TSL45315 ambient light sensor on the Arduino platform.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 100.0%