I have done more testing with the “ACCL-Nx-3g3x” accelerometer part from Mindsensors. My goal was to obtain the X and Y axis values from the sensor over Bluetooth using Lego NXT Direct Commands, and then link those values to pitch and roll gauges on a PC Dashboard.
First, I looked up what Lego NXT Direct Commands were needed to read the sensor's values over I2C. I checked the Mindsensors datasheet to determine what I2C command codes and memory addresses to use. Reading single axis registers worked well, however, when I started polling the sensor at 40ms intervals, NXT was timing out. It appears the NXT uses a software driven I2C, and there were some issues with glitches being introduced. I can confirm this has been fixed in Lego NXT's version 1.04 firmware released a couple of weeks ago. Downloading and installing the new NXT firmware fixed the problem for me, so anyone building home-brew I2C sensors should try the upgrade!
The colors and other properties can be edited, but here are the pitch and roll gauges I ended up with and included in the sample roboDNA Lego NXT dashboard:
First, I looked up what Lego NXT Direct Commands were needed to read the sensor's values over I2C. I checked the Mindsensors datasheet to determine what I2C command codes and memory addresses to use. Reading single axis registers worked well, however, when I started polling the sensor at 40ms intervals, NXT was timing out. It appears the NXT uses a software driven I2C, and there were some issues with glitches being introduced. I can confirm this has been fixed in Lego NXT's version 1.04 firmware released a couple of weeks ago. Downloading and installing the new NXT firmware fixed the problem for me, so anyone building home-brew I2C sensors should try the upgrade!
The colors and other properties can be edited, but here are the pitch and roll gauges I ended up with and included in the sample roboDNA Lego NXT dashboard: