i2c problem with BMP085 on Micro can someone help!

I'm using a barometric pressure sensore BMP085 from Sparkfun.

I've connected on an Uno board (SDA=4/SCL=5) and it works perfectly; switched to a Micro the sketch returns "sensor not connected" message,

Looking around i've discovered that Micro has clock and data pins on 2 and 3, and i've moved connections there, but unfortunately no results again.

Running the Scani2c sketch seems as it is not working.

Re.connected to Arduino Uno and works.

Using 3.3v.

Please someone has some soggestion for me? Thank you!

Chumbaz:
I've connected on an Uno board (SDA=4/SCL=5) and it works perfectly

I presume you mean analog pins 4 (SDA) and 5 (SCL)?

Chumbaz:
Looking around i've discovered that Micro has clock and data pins on 2 and 3, and i've moved connections there, but unfortunately no results again.

Do you mean digital pins 2 (SDA) and 3 (SCL)? Did you remember to change the board type from Arduino Uno to Arduino Micro before you uploaded?

OMG

So; in arduino Uno sensor was connected to A4 & A5
In Micro is... A2 & A3... but?!?!?!? Have to be the digital ones???
And how can i do, those 2 pins are used by the HITACHI display... ARGHHHHHHH

Chumbaz:
And how can i do, those 2 pins are used by the HITACHI display... ARGHHHHHHH

Assuming the display doesn't use I2C, you can move it to some other pins, and adjust the software accordingly. If it does use I2C, then you can share those pins between both devices.

Unfortunately, ALL the digital PIN actually are in use
and the display is a standard LCD 16x2 HITACHI, which uses an horrible amount of pins.
so: no way

BUT!!!!!!!!!!!!!!!!!!!!!

You say that if I buy I2C displays (i see a lot of different examples at very low prices) I can connect to I2C Arduino Pins (I2&I3) the LCD AND the BMP058 sensor? WOW!!!!

Thank you very much for your time, I apologize for having forgotten above

Chumbaz:
Unfortunately, ALL the digital PIN actually are in use

...but you evidently have at least 2 analog pins free, and I believe all the analog pins on the Micro can be used as digital pins too. For example:

pinMode(A0, OUTPUT);
digitalWrite(A0), HIGH);

So, what you suggest is

  • Disconnect PIN I2&I3 from LCD
  • Connect Sensor to I2&I3, to use with i2c protocol
  • Connect vacant LCD pins to, btw, A2&A3
  • Set them as digital
  • Reconfigure Liquid start command

Correct?

Chumbaz:
So, what you suggest is

  • Disconnect PIN I2&I3 from LCD
  • Connect Sensor to I2&I3, to use with i2c protocol
  • Connect vacant LCD pins to, btw, A2&A3
  • Set them as digital
  • Reconfigure Liquid start command

Correct?

Correct.

Otherwise, I will have to buy an I2C LCD that can be connected sharing same I2&I3 pins with my sensor, correct?

excuse if i abuse of your time but i'm trying to learn, i'm googoling "sharing i2c" and sounds reasonable
and i simply hate to have to sacrify 8 pins just for having a LCD :frowning: so any other solution is GOOD

Chumbaz:
Otherwise, I will have to buy an I2C LCD that can be connected sharing same I2&I3 pins with my sensor, correct?

Yes, you can use the same I2C pins for both the BMP085 and the LCD, provided that they have different I2C addresses.