Hi
I want to use a RTC module (RealTimeClock \ Learning \ Wiring) in my Arduino Mega project, however pins 20/21 for SDA and SCL are occupied.
How can I connect my module? Any recommendations?
Hi
I want to use a RTC module (RealTimeClock \ Learning \ Wiring) in my Arduino Mega project, however pins 20/21 for SDA and SCL are occupied.
How can I connect my module? Any recommendations?
I want to use a RTC module (RealTimeClock \ Learning \ Wiring) in my Arduino Mega project, however pins 20/21 for SDA and SCL are occupied.
How can I connect my module? Any recommendations?
Well, free the pins and connect the RTC in thoose pins.Since the RTC use a I2C bus you cant change the pins
Im also using a temperature module that HAVE to use the exact same pins......that is the reason I ask here, for a workaround maybe?
Im also using a temperature module that HAVE to use the exact same pins
If the temperature module is an I2C module then you can run both things off the same pins because the I2C is a bus.
I have got two options:
SHT15 (Humidity and Temperature Sensor - SHT15 - COM-08227 - SparkFun Electronics)
DH11 (http://www.robotshop.com/en/electronic-brick-humidity-temperature-sensor.html)
Will any of these will do? I can't try them at the moment, but it will be good to know to plan ahead.
Thanks
Will any of these will do?
Not sure what you mean.
The first is an I2C device but for the second the data is a bit poor and I can't tell.
As I said before you can have many devices on the I2C bus there is no need for other I2C lines.
DHT11 is not an i2c device, so you could not use that with the rtc. The sht15 is i2c, that should work with your rtc.
Thank you for your suggestions.
One last thing I would like to know is how can I connect both devices on the same pin?
What I meant, will I need a multiplexer like this one for example, or connect straightaway?
If your two I2C-devices use the same address, you need a multiplexer.
If they have different addresses, there is no need for a multiplexer.
It's very rare to have two devices with the same address.
// Per.
PaulRB:
DHT11 is not an i2c device, so you could not use that with the rtc. The sht15 is i2c, that should work with your rtc.
Sorry to say this but both these devices, DHT11 and SHT1x, are NOT I2C. They have other protocols.
Cheers!
kowalski:
PaulRB:
The sht15 is i2cSHT1x, are NOT I2C
Many apologies! I was thinking of SHT21. That is i2c. (I am a "God" member now and should therefore be infallible...hmmm...)
Non-problemo, Then you can have the RTC (DS1307) and SHT21 on the same pins. No extra pins needed!
Cheers!
Louis, what kind of temp sensor is this? If its just measuring air temperature, you could use a ds3231 based RTC, those have temp sensors built in.
Paul
Thanks a lot for the clarification, and to tell you the truth I just realized that it was my mistake because I actually meant instead of the SHT15 this light sensor: TSL2561 Luminosity Sensor Hookup Guide - SparkFun Learn that DOES use the SDA and SCL pins.
I will try it now and see if it works alright together with the RTC