Using the NXT Light Sensor.

Does anyone know how to get data from NXT sensors VIA I2C?

We hooked a light sensor to the I2C port on the Digital Side Car, and the red LED illuminated.

In Java:

byte] byte1 = new byte[100];, 7,  byte1);

for(int i= 0; i < 100; i++)

Note: Ls is defined as an I2C in the Constructor:

four = new DigitalModule(4);
ls=new I2C(four,0);


The Short answer is, You can’t.
The Long answer: The NXT Light sensor doesn’t use I2C to communicate. The only sensor that does, is the ultrasonic sensor. If you really wanted to use the light sensor, you should be able to hook it up to the analog Module.

Do you know where we can get a pinout, for the sensors?

and or directions to hook it up to the analog module.

The documentation for The NXT brick, and the sensors is available from under the hardware development kit. You should be able to figure out the pinout from those documents.