RTC and 4 digit display both use clock pin of Arduino Micro

I am a returning Arduino user, and I would like to show a countdown timer on a display. For this purpose, I am utilizing a clock module (RTC DS3231 I2C) and a 4-digit display with an I2C backpack. The Arduino board I am using is an Arduino Micro. Now, I need to integrate the code for the clock and the code for the display. Both of them seem to want to use clock pins 2 and 3. Is it possible to use these pins simultaneously, or can I opt for alternative pins?

Would you show the sketch or sketches where you see the pins 2 and 3 issue? Usually I2C devices need Vcc (power), GND (ground), and two pins A5/CLK (clock), A4/SDA (data), and the 4dig/7seg can use A4/A5 as well. The two devices must have different hardware addresses (these addresses will also be in your sketch/es).

D2 and D3 are the I2C bus on an Arduino Micro. As the name suggest, i2C is a bus, so you can connect both to the same pins. They are distinguished by the software via their (hopefully different :wink: ) addresses.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.