Hi, in the color sensor twig sample code on garden.seeedstudio.com/index.php … nsor_v0.9b I think the line indicated below is a bug:
Serial.println("The x,y value is");
Serial.println("Error,the value overflow");
This always prints “overflow” when looking at a bright red color. If you put red=1 and green+blue=0 into the formula you will see that X, Y, and Z will all be negative, so this is normal operation rather than an overflow. It works fine if you just remove this test.