Understanding I2C

I'm having difficulty creating the needed code for an I2C bus system between an Altimeter and an Arduino Uno. Or at-least the understanding of it.

Here's the altimeter library I'm using but it doesn't have commands where I can set the SCL and SDA pin codes, in my case they're A5 and A4 respectively. Does the library automatically know which pins are the right ones? Or will I need to add additional commands to the library? This is my first time using I2C buses, I've done some research but they always state to set the pins, in my case I can't with the current libraries.

The end device does not have to know what pins you are using on an Arduino for the I2C communication. But, depending on the Arduino you are using, you have to inform the Wire library if you are not using the defaults pins. [Wire.begin( SDA , SCL ) ] If it is a Uno etc. then this is fixed at A4 and A5 so you don't have to (and can't) do anything.

I haven't used that particular library, but I have used the one from Adafruit for the VL6180X Time of Flight Sensor. If your library is anything like the T.o.F. library it'll "just work right" with no additional work on your part.

At least it did for me when I hooked it up to a PJRC Teensy 2, and if an Arduino library used by an Adafruit peripheral attached to a PJRC device works correctly, then I'd make a guess things will work properly in your situation.

dgnuff: I haven't used that particular library,

O no? What's the first line in the Adafruit_VL6180X library? ;)

septillion: O no? What's the first line in the Adafruit_VL6180X library? ;)

I was referring to the Altimeter library linked by the OP in his post.

I'm taking a SWAG now, but I'll bet anyone in here lunch on my dime that the Altimeter library uses Wire, just like the ToF sensor does.

dgnuff:
I was referring to the Altimeter library linked by the OP in his post.

Sorry! I thought / assumed you where the topic starter when I replied :-X