If they both use I2C then you can attach them both to the same two pins (SDA and SCL)
You select which one you wish to talk to by using it's address for the first byte of each command (which should be given in the documentation along with example communications) For example on page 16 of the datasheet for the BMP085 this is given as 0xEE
(write) and 0xEF
(read)
It looks like the first sensor has pullup resistors included which means you don't have to add them yourself.
I take it the Arduino Wire library is a software implementation of I2C (as opposed to a dedicated on board peripheral) If this is the case I imagine you can select which pins you want to use in the defines section. So in your case you would select A4 and A5 as SCL and SDA (which ever way round you want them)
The first link I looked at had various helpful links including quickstart guide, datasheet, wiring example, and an example Arduino sketch, so I'd probably start by following those. To keep it simple, I would try and get that sensor talking to the Arduino then add the other one.
I notice that the BMP085 runs from 3.3V, so you will need to use a 3.3V supply and disable the weak pullups to 5V in the Arduino wire library (see comments on product page)
You can probably run the other sensor from 3.3V too but you would need to confirm this - it should work fine from 5V with logic high to 3.3V anyway if necessary.
The accelerometer's reading seem to make sense. The datasheet, page 13 indicates 4 different sensitivities:
2 g
4 g
8 g
16 g
with resp. sensitivity scale factors:
16 384 counts/g
8 192 counts/g
4 096 counts/g
2 048 counts/g
From the Z-reading I assume you have the 2 g scale selected, then 15 608 is 0.95 g, which is what you can expect from a Z-axis reading when you hold the sensor more or less horizontal. The X- and Y-reading are probably also due to gravitation when you're not holding the part perfectly horizontal. And you'll have an error in the reading too.
Similar for the gyro. At 131 counts per degree/s you may have this kind of reading if you're holding the part in your hands.
Best Answer
For the hardware part, look at page 6 of the datasheet and move the resistor at the
0x76
label to the0x77
position on one of the sensors.If you're using the library linked to from SparkFun, have a look at line #39 of the code:
This declares and initializes a sensor object for the "high" address
0x76
and makes it available via a variable namedsensor
.Then you can operate the sensor like
So all you'd have to do is to set up another sensor object like
and use it like
to query data from the other sensor (the one with
0x77
("low" address)).