#include <Adafruit_TCS34725.h>
Adafruit_TCS34725 tcs = Adafruit_TCS34725(TCS34725_INTEGRATIONTIME_101MS, TCS34725_GAIN_4X);
uint16_t r, g, b, c, colorTemp, lux;
void setup() {
Serial.begin(9600);
tcs.begin();
}
void loop() {
tcs.getRawData(&r, &g, &b, &c);
colorTemp = tcs.calculateColorTemperature(r, g, b);
lux = tcs.calculateLux(r, g, b);
Serial.print(colorTemp, DEC); Serial.print(";");
Serial.print(lux, DEC); Serial.print(";");
Serial.print(r, DEC); Serial.print(";");
Serial.print(g, DEC); Serial.print(";");
Serial.print(b, DEC); Serial.print(";");
Serial.print(c, DEC); Serial.print(";");
Serial.println(" ");
delay(50);
}