Package crackers.kobots.devices.sensors
Class VCNL4040
-
- All Implemented Interfaces:
-
com.diozero.api.DeviceInterface
,com.diozero.devices.LuminositySensorInterface
,com.diozero.devices.SensorInterface
,java.lang.AutoCloseable
public final class VCNL4040 implements LuminositySensorInterface
Proximity and ambient light sensor on I2C bus. Note that this is not a "ranging" device as the proximity _ increases as an object approaches the sensor. The value is also not linear, but geometric.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enum
VCNL4040.AmbientLightIntegrationTime
public enum
VCNL4040.AmbientLightPersistence
public enum
VCNL4040.ProximityIntegrationTime
public enum
VCNL4040.ProximityMultipulse
public enum
VCNL4040.LEDCurrent
public enum
VCNL4040.LEDDutyCycle
public enum
VCNL4040.ProximityInterruptType
public enum
VCNL4040.ProximityResolution
public enum
VCNL4040.ProximityOperation
-
Field Summary
-
Method Summary
-
-
Method Detail
-
getProximity
final Short getProximity()
-
getAmbientLight
final Short getAmbientLight()
-
getWhiteLight
final Short getWhiteLight()
-
getInterruptStatus
final Integer getInterruptStatus()
-
getAmbientLightHighThreshold
final Short getAmbientLightHighThreshold()
-
setAmbientLightHighThreshold
final Unit setAmbientLightHighThreshold(Short ambientLightHighThreshold)
-
getAmbientLightLowThreshold
final Short getAmbientLightLowThreshold()
-
setAmbientLightLowThreshold
final Unit setAmbientLightLowThreshold(Short ambientLightLowThreshold)
-
getProximityLowThreshold
final Short getProximityLowThreshold()
-
setProximityLowThreshold
final Unit setProximityLowThreshold(Short proximityLowThreshold)
-
getProximityHighThreshold
final Short getProximityHighThreshold()
-
setProximityHighThreshold
final Unit setProximityHighThreshold(Short proximityHighThreshold)
-
getAmbientLightIntegrationTime
final VCNL4040.AmbientLightIntegrationTime getAmbientLightIntegrationTime()
-
setAmbientLightIntegrationTime
final Unit setAmbientLightIntegrationTime(VCNL4040.AmbientLightIntegrationTime ambientLightIntegrationTime)
-
getAmbientLightInterruptPersistence
final VCNL4040.AmbientLightPersistence getAmbientLightInterruptPersistence()
-
setAmbientLightInterruptPersistence
final Unit setAmbientLightInterruptPersistence(VCNL4040.AmbientLightPersistence ambientLightInterruptPersistence)
-
getAmbientLightInterruptsEnabled
final Boolean getAmbientLightInterruptsEnabled()
-
setAmbientLightInterruptsEnabled
final Unit setAmbientLightInterruptsEnabled(Boolean ambientLightInterruptsEnabled)
-
getAmbientLightEnabled
final Boolean getAmbientLightEnabled()
-
setAmbientLightEnabled
final Unit setAmbientLightEnabled(Boolean ambientLightEnabled)
-
getProximityLEDDutyCycle
final VCNL4040.LEDDutyCycle getProximityLEDDutyCycle()
-
setProximityLEDDutyCycle
final Unit setProximityLEDDutyCycle(VCNL4040.LEDDutyCycle proximityLEDDutyCycle)
-
getProximityInterruptPersistence
final Integer getProximityInterruptPersistence()
-
setProximityInterruptPersistence
final Unit setProximityInterruptPersistence(Integer proximityInterruptPersistence)
-
getProximityIntegrationTime
final VCNL4040.ProximityIntegrationTime getProximityIntegrationTime()
-
setProximityIntegrationTime
final Unit setProximityIntegrationTime(VCNL4040.ProximityIntegrationTime proximityIntegrationTime)
-
getProximityEnabled
final Boolean getProximityEnabled()
-
setProximityEnabled
final Unit setProximityEnabled(Boolean proximityEnabled)
-
getProximityHighResolution
final VCNL4040.ProximityResolution getProximityHighResolution()
-
setProximityHighResolution
final Unit setProximityHighResolution(VCNL4040.ProximityResolution proximityHighResolution)
-
getProximityInterrupts
final VCNL4040.ProximityInterruptType getProximityInterrupts()
-
setProximityInterrupts
final Unit setProximityInterrupts(VCNL4040.ProximityInterruptType proximityInterrupts)
-
getProximityMultipulse
final VCNL4040.ProximityMultipulse getProximityMultipulse()
-
setProximityMultipulse
final Unit setProximityMultipulse(VCNL4040.ProximityMultipulse proximityMultipulse)
-
getProximitySmartPersistenceEnabled
final Boolean getProximitySmartPersistenceEnabled()
-
setProximitySmartPersistenceEnabled
final Unit setProximitySmartPersistenceEnabled(Boolean proximitySmartPersistenceEnabled)
-
getProximityActiveForceEnabled
final Boolean getProximityActiveForceEnabled()
-
setProximityActiveForceEnabled
final Unit setProximityActiveForceEnabled(Boolean proximityActiveForceEnabled)
-
getSunlightCancelEnabled
final Boolean getSunlightCancelEnabled()
-
setSunlightCancelEnabled
final Unit setSunlightCancelEnabled(Boolean sunlightCancelEnabled)
-
getWhiteLightEnabled
final Boolean getWhiteLightEnabled()
-
setWhiteLightEnabled
final Unit setWhiteLightEnabled(Boolean whiteLightEnabled)
-
getProximityOperation
final VCNL4040.ProximityOperation getProximityOperation()
-
setProximityOperation
final Unit setProximityOperation(VCNL4040.ProximityOperation proximityOperation)
-
getProximityLEDCurrent
final VCNL4040.LEDCurrent getProximityLEDCurrent()
-
setProximityLEDCurrent
final Unit setProximityLEDCurrent(VCNL4040.LEDCurrent proximityLEDCurrent)
-
dumpRegisters
final Unit dumpRegisters()
-
getLuminosity
Float getLuminosity()
-
isEnteringProtectionMode
final Integer isEnteringProtectionMode(Integer interruptStatus)
-
isAmbientLightLow
final Integer isAmbientLightLow(Integer interruptStatus)
-
isAmbientLightHigh
final Integer isAmbientLightHigh(Integer interruptStatus)
-
isProximityClose
final Integer isProximityClose(Integer interruptStatus)
-
isProximityFar
final Integer isProximityFar(Integer interruptStatus)
-
activeForceModeTrigger
final Unit activeForceModeTrigger()
Outputs one data cycle - see p. 10
-
-
-
-