Main Site Documentation

Driver - ITG3200+ADXL345+HMC5883L Multiple I2C on same bus


#1

[title]ITG3200+ADXL345+HMC5883L Multiple I2C on same bus[/title]
http://code.tinyclr.com/project/441/itg3200adxl345hmc5883l-multiple-i2c-on-same-bus/
[line]
When it comes to IMU units, you might need more than one device on the I2C bus, and frankly NETMF is too tedious for handling multiple devices.
So I borrowed the code from Netduino forum plus a lot of code from http://LoveElectronics.co.uk and from TinyClr to integrate 3 I2C devices on the same bus:
HMC5883L Magnetometer
ADXL345 Accelerometer
ITG3200 Gyro
And glued those together to display results on ST7565 LCD display (code from thttp://inyclr.com).

I hope that what I found simpler to use in order to access multiple devices on the bus will be useful for others too.

The source code section contains the abstract class and static class for I2CBus and I2C device.
The usage sample code helps you see the program I wrote to display all on the LCD.
For complete view of the sensors classes see the attached ZIP file