I just got a BrickPi Advanced a few days ago and I’m having problems getting the NXT 2.0 color sensor to report the correct color. I have the problem on any port and with both the Java code and Python LEGO color sample program.
If I start and stop the LEGO-Color_Sensor_Test.py program over and over, with a white sheet of paper under the sensor, it will report a different color almost every time. If the sensor does start on color 6, then it will correctly report other colors, if not, then it is never correct.
This same sensor works fine with the NXT 2.0 brick.
I also tested the BrickPi with the EV3 color sensor with the EV3 Python sample, and it reports the correct color ever time. I have also tested the US sensor and touch sensor and they seem to be okay. The EV3 US sensor was extremely slow to update, but that is a different topic.
In a Java test program, I added a call to brickPi.setupSensors(); in a loop with a 100 ms sleep and each time after calling that, I get a different color after each call to setup.
The BrickPi is powered with 8AA NiMH and the Pi is powered with a USB mobile battery pack. Pi was not setup using the dexter image, but I followed the steps of how to modify an existing Raspbain install. The Wifi driver on my Pi took forever to build and install and I did not want to have to revisit that.