1. Import AnalogChannel
2. Use this is to initialize the sensor:
Code:
AnalogChannel color = new AnalogChannel(channel number);
3. Use this to read the value:
Code:
System.out.println(color.getValue());
That'll probably take a ton of testing to figure out what darkness is what but you'll get there with enough work.