Loom_TSL2591 class
TSL2591 Lux sensor module.
Contents
Base classes
- class LoomI2CSensor
- Abstract root for I2C sensor modules.
Protected variables
- Adafruit_TSL2591 inst_tsl2591
- Underlying TSL2591 sensor manager instance.
- uint16_t vis
- Measured visable. Units: lux.
- uint16_t ir
- Measured infra-red. Units: lux.
- uint16_t full
- Measured full spectrum. Units: lux.
- uint8_t gain_level
- Sensor gain level setting to use.
- uint8_t timing_level
- Sensor integration time setting.
CONSTRUCTORS / DESTRUCTOR
- Loom_TSL2591(LoomManager* manager, const byte i2c_address = 0x29, const uint8_t mux_port = 255, const uint8_t gain_level = 1, const uint8_t timing_level = 0)
- Constructor.
- Loom_TSL2591(LoomManager* manager, JsonArrayConst p)
- Constructor that takes Json Array, extracts args and delegates to regular constructor.
- ~Loom_TSL2591() defaulted
- Destructor.
OPERATION
PRINT INFORMATION
- void print_measurements() const override
- Print the last set of measurements taken.
Function documentation
Loom_ TSL2591:: Loom_TSL2591(LoomManager* manager,
const byte i2c_address = 0x29,
const uint8_t mux_port = 255,
const uint8_t gain_level = 1,
const uint8_t timing_level = 0)
Constructor.
Parameters | |
---|---|
manager | |
i2c_address in | Set(Int) | <0x29> | {0x29} | I2C address |
mux_port in | Int | <255> | [0-16] | Port on multiplexer |
gain_level in | Set(Int) | <1> | { 1 } | Gain level |
timing_level in | Set(Int) | <0> | { 0 } | Timing level |
Loom_ TSL2591:: Loom_TSL2591(LoomManager* manager,
JsonArrayConst p)
Constructor that takes Json Array, extracts args and delegates to regular constructor.
Parameters | |
---|---|
manager | |
p in | The array of constuctor args to expand |
void Loom_ TSL2591:: package(JsonObject json) override
Package a modules measurements or state.
Parameters | |
---|---|
json out | Object to put data into |
void Loom_ TSL2591:: print_measurements() const override
Print the last set of measurements taken.
Does not package the data.