Class daisy::Apds9960¶
Device support for APDS9960 gesture / RGB / proximity sensor. More...
#include <apds9960.h>
Classes¶
Type | Name |
---|---|
struct | Config |
Public Types¶
Type | Name |
---|---|
enum | Result |
Public Functions¶
Detailed Description¶
Author:
beserge
Date:
December 2021
Public Types Documentation¶
enum Result¶
Public Functions Documentation¶
function Apds9960¶
function CalculateColorTemperature¶
Converts the raw R/G/B values to color temperature in degrees Kelvin
Parameters:
r
Red valueg
Green valueb
Blue value
Returns:
Color temperature
function CalculateLux¶
Calculate ambient light values
Parameters:
r
Red valueg
Green valueb
Blue value
Returns:
LUX value
function ClearInterrupt¶
Clears interrupt
function ColorDataReady¶
Returns status of color data
Returns:
True if color data ready, False otherwise
function Enable¶
Enables the device / Disables the device (putting it in lower power sleep mode)
Parameters:
en
Enable
function EnableColor¶
Enable color readings
Parameters:
en
Enable
function EnableGesture¶
Enable gesture readings
Parameters:
en
Enable
function EnableProximity¶
Enable proximity readings
Parameters:
en
Enable
function GestureValid¶
Returns validity status of a gesture
Returns:
Status (True/False)
function GetADCIntegrationTime¶
Returns the integration time for the ADC of the APDS9960, in millis
Returns:
Integration time
function GetColorData¶
inline void daisy::Apds9960::GetColorData (
uint16_t * r,
uint16_t * g,
uint16_t * b,
uint16_t * c
)
Reads the raw red, green, blue and clear channel values
Parameters:
*r
Red value*g
Green value*b
Blue value*c
Clear channel value
function GetColorDataBlue¶
Reads the raw blue channel value
Returns:
Blue channel value
function GetColorDataClear¶
Reads the raw clear channel value
Returns:
Clear channel value
function GetColorDataGreen¶
Reads the raw green channel value
Returns:
Green channel value
function GetColorDataRed¶
Reads the raw red channel value
Returns:
Red channel value
function GetProxGain¶
Returns the Proximity gain on the APDS9960
Returns:
Proxmity gain
function Init¶
Initialize the APDS9960 device
Parameters:
config
Configuration settings
function Read16R¶
function Read8¶
function ReadGesture¶
Reads gesture
Returns:
Received gesture (1,4) -> {UP, DOWN, LEFT, RIGHT}
function ReadProximity¶
Read proximity data
Returns:
Proximity
function ResetCounts¶
Resets gesture counts
function SetADCGain¶
Adjusts the color/ALS gain on the APDS9960 (adjusts the sensitivity to light)
Parameters:
aGain
Gain
function SetADCIntegrationTime¶
Sets the integration time for the ADC of the APDS9960, in millis
Parameters:
iTimeMS
Integration time
function SetColorInterrupt¶
Enables/disables color interrupt
Parameters:
en
Enable / disable
function SetGestureDimensions¶
Sets gesture dimensions
Parameters:
dims
Dimensions
function SetGestureFIFOThreshold¶
Sets gesture FIFO Threshold
Parameters:
thresh
Threshold
function SetGestureGain¶
Sets gesture sensor gain
Parameters:
gain
Gain
function SetGestureOffset¶
inline void daisy::Apds9960::SetGestureOffset (
uint8_t offset_up,
uint8_t offset_down,
uint8_t offset_left,
uint8_t offset_right
)
Sets gesture sensor offset
Parameters:
-
offset_up
Up offset -
offset_down
Down offset offset_left
Left offsetoffset_right
Right offset
function SetGestureProximityThreshold¶
Sets gesture sensor threshold
Parameters:
thresh
Threshold
function SetIntLimits¶
Sets interrupt limits
Parameters:
low
Low limithigh
High limit
function SetLED¶
Set LED brightness for proximity/gesture
Parameters:
drive
LED Drive (0,3) -> {100mA, 50mA, 25mA, 12.5mA}boost
LED Boost (0,3) -> {100%, 150%, 200%, 300%}
function SetProxGain¶
Adjusts the Proximity gain on the APDS9960
Parameters:
pGain
Gain
function SetProxPulse¶
Sets number of proxmity pulses
Parameters:
pLen
Pulse Lengthpulses
Number of pulses
function SetProximityInterrupt¶
Enables / Disables color interrupt
Parameters:
en
Enable / disable
function Write8¶
function enable¶
function ~Apds9960¶
The documentation for this class was generated from the following file external-docs/libDaisy/src/dev/apds9960.h