Class TSL2561

java.lang.Object
com.diozero.devices.TSL2561
All Implemented Interfaces:
LuminositySensorInterface, SensorInterface, java.io.Closeable, java.lang.AutoCloseable

public class TSL2561
extends java.lang.Object
implements java.io.Closeable, LuminositySensorInterface
  • Nested Class Summary

    Nested Classes 
    Modifier and Type Class Description
    static class  TSL2561.TSL2561Package  
  • Constructor Summary

    Constructors 
    Constructor Description
    TSL2561​(int controllerNumber, int addressSize, int clockFreq, TSL2561.TSL2561Package tsl2561Package)  
    TSL2561​(TSL2561.TSL2561Package tsl2561Package)  
  • Method Summary

    Modifier and Type Method Description
    void close()  
    float getLuminosity()
    Converts the raw sensor values to the standard SI lux equivalent.
    void setAutoGain​(boolean autoGain)
    Enables or disables the auto-gain settings when reading data from the sensor
    void setGain​(int gain)
    Adjusts the gain on the TSL2561 (adjusts the sensitivity to light)

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait