|
Re: I2C Color Sensor not working
So what we've experienced is that our addressing appears to be correct. We are able to turn the LED on and off.
What's not working is the I2C read. Code below:
byteAr = new byte[1];
boolean success = !ColorSensor.read(0x04, 1, byteAr);
The read is always returning true, which means the read has failed. If we ignore that and try to use the value in byteAr we get an index out of bounds exception.
Not sure where to go from here since it does not appear to be address related.
FWIW, we were able to connect the sensor to a Raspberry Pi and read from the various address locations. RoboRio no success.
Any ideas?
|