Check if a color reading is available from the senor. The color reading can be retrieved using the APDS.readColor(...)
function. This function also enables the color sensor when called for the first time.
APDS.colorAvailable()
None.
1 if a color has been read, otherwise 0.
// Check if a color reading is available.
if (APDS.colorAvailable()) {
int r, g, b;
// Read the color.
APDS.readColor(r, g, b);
}