void setup() { Serial.begin(9600); Wire.begin(); if(!RGBWSensor.begin()) { Serial.println("ERROR: couldn't detect the sensor"); while(1){} } /\* \* init RGBW sensor with: \* - 320ms integration time \* - auto mode \* - color sensor enable \*/ RGBWSensor.setConfiguration(VEML6040_IT_320MS + VEML6040_AF_AUTO + VEML6040_SD_ENABLE);
delay(1500); Serial.println("Vishay VEML6040 RGBW color sensor auto mode example"); Serial.println("CCT: Correlated color temperature in \260K"); Serial.println("AL: Ambient light in lux"); delay(1500); }