user27157: I have 2 I2C devices that uses the same address. One of them is the DS3231 RTC. I use this library for the DS3231. I dont want to mess with the other one cause it is way more complicated then this one.:
#include <DS3231.h>

http://www.rinkydinkelectronics.com/library.php?id=73
Then, there is an object declaration for the real time clock:
DS3231  rtc(SDA, SCL);

I wounder if I can change that to:
DS3231  rtc(A0, A1);

I've seen the library but I haven't understand it yet (duh... I'm so stupid!). But is it possible to use an other pair of pins for I2C communication.
Note that I've already tried to use the soft I2C library but I really want to avoid it because it is just too much. If it is the final solution then so be it.

user27157: Ok, so I've realise that the anwser was somewhat on the page of the library (that I completly ignored). I can change the pins like I did because the library uses a "TWI-/I2C-like protocol".

The library has not been tested in combination with the Wire library and I have no idea if they can share pins. Do not send me any questions about this. If you experience problems with pin-sharing you can move the DS3231/DS3232 SDA and SCL pins to any available pins on your development board. This library will in this case fall back to a software-based, TWI-/I2C-like protocol which will require exclusive access to the pins used.


user2881: You can change the address of the GY-521 by pulling the AD0 pin to Vcc. After that the address will be 0x69 instead of 0x68.

27157: <p>I have 2 I2C devices that uses the same address. One of them is the DS3231 RTC. I use this library for the DS3231. I dont want to mess with the other one cause it is way more complicated then this one.:</p>

<pre><code>#include &lt;DS3231.h&gt;
</code></pre>

<p><a href="http://www.rinkydinkelectronics.com/library.php?id=73" rel="nofollow">http://www.rinkydinkelectronics.com/library.php?id=73</a></p>

<p>Then, there is an object declaration for the real time clock:</p>

<pre><code>DS3231  rtc(SDA, SCL);
</code></pre>

<p>I wounder if I can change that to:</p>

<pre><code>DS3231  rtc(A0, A1);
</code></pre>

<p>I've seen the library but I haven't understand it yet (duh... I'm so stupid!). But is it possible to use an other pair of pins for I2C communication.</p>

<p>Note that I've already tried to use the soft I2C library but I really want to avoid it because it is just too much. If it is the final solution then so be it.</p>
 27157: <p>Ok, so I've realise that the anwser was somewhat on the page of the library (that I completly ignored). I can change the pins like I did because the library uses a "TWI-/I2C-like protocol".</p>

<blockquote>
  <p>The library has not been tested in combination with the Wire library and I have no idea if they can share pins. Do not send me any questions about this. If you experience problems with pin-sharing you can move the DS3231/DS3232 SDA and SCL pins to any available pins on your development board. This library will in this case fall back to a software-based, TWI-/I2C-like protocol which will require exclusive access to the pins used.</p>
</blockquote>
 2881: <p>You can change the address of the GY-521 by pulling the AD0 pin to Vcc. After that the address will be 0x69 instead of 0x68.</p>
