by gloomyandy » Fri Nov 13, 2009 9:10 am
Hi,
Yes that should be fine. You wil have to set the address of the module before trying to talk to it using setAddress, you may also need to set the operating mode of the sensor to STANDARD_MODE (the default is LEGO_MODE), you do this by passing the mode into the constructor for the I2CSensor class.
If the sensor does not seem to work then try using the address divided by 2, leJOS uses 7 bit I2C addresses but some devices specify the address as an 8 bit value and to convert you need to shift the 8 bit address right by 1 bit (divide by 2)....
Andy