I2C connections

For Adafruit customers who seek help with microcontrollers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
project_science
 
Posts: 190
Joined: Sun May 04, 2014 1:26 pm

I2C connections

Post by project_science »

Hi,

I'd like to add a compass (https://learn.adafruit.com/adafruit-hmc ... g-and-test) to my robot. My robot will use:

- Ultimate GPS Sheild
- Arduino Wireless SD Shield
- Arduino Leonardo
- 2 sonar sensors (http://users.ece.utexas.edu/~valvano/Da ... CSR04b.pdf)

Now i'd like to add the compass from the first link. My concern is that on the page it says, "The HMC5883L has a fixed I2C address, you can only connect one sensor per microcontroller!"

Does this mean that I can't use any other sensors OR devices which use I2C? Or does it mean I can only use 1 compass sensor because the addresses are all the same for the COMPASS?

My understanding is that you can have many devices used on a microcontroller over I2C.

User avatar
egutting
 
Posts: 297
Joined: Wed Nov 14, 2012 12:57 am

Re: I2C connections

Post by egutting »

It means that you can only have 1 type of that sensor on your bus. There is a limit though on how many sensors you can have on 1 bus. If I'm counting right, you should be ok with those 5 sensors assuming none of them have the same I2C address.

User avatar
adafruit_support_bill
 
Posts: 88097
Joined: Sat Feb 07, 2009 10:11 am

Re: I2C connections

Post by adafruit_support_bill »

Does this mean that I can't use any other sensors OR devices which use I2C? Or does it mean I can only use 1 compass sensor because the addresses are all the same for the COMPASS?
Only one compass. You can have as many other devices on the i2c bus as you like - provided that they all have different i2c addresses.

Locked
Please be positive and constructive with your questions and comments.

Return to “Microcontrollers”