Use ZS-042 with sd Card

Hi.

I have an arduino mega with a tft display with an sdcard module, i am using it to save data from temperature and humidity sensor.

So i have to save the data with the actual date, for that i have a ZS-042 module wich uses SDA and SCL pins for arduino.

That pins are used by the SDCard too, so, is possible that SDCard and ZS-042 shares the SDA and SCL pins?

Thanks.

The bus is built for sharing. Both SPI and I2C can have several units connected.:slight_smile:
..are u sure they use the same bus? often tft use SPI (pins 50..53) and the RTC uses I2C(near Aref)

Sorry you're right.

what is connected in that pins is a barometer BMP180.

I deffined the variables like this:

BMP180 barometer;

// control Timer
RTC_DS1307 rtc;

Do i need to change something?

Thanks

Install the libraries from 'library manager' (search for "BMP" and "1307")

Then take a look in the examples