user43552: For a robotics project I am using an MCP23017 I/O Port Expander in order to have more pins available, and I am also using a PS2 controller for input. Both of these require pins 4 and 5 (because these are the data and clock pins). I was wondering if I can use a breadboard to simply connect these two pins to both devices in order to provide both of them with data and clock pins.
I am using an Arduino UNO and a playstation 2 controller with the following guide:
http://www.techmonkeybusiness.com/using-a-playstation-2-controller-with-your-arduino-project.html

user10794: You are confusing pins here. In the library you mention there is a function call to set up the gamepad:
 ps2x.config_gamepad(5,4,3,2, false, false);
 //setup pins and settings: GamePad(clock, command, attention, data, Pressures, Rumble)

That is digital pins 5, 4, 3 and 2.
I2C uses analog input pins A4 and A5 on the other side of your Uno board.

43552: <p>For a robotics project I am using an MCP23017 I/O Port Expander in order to have more pins available, and I am also using a PS2 controller for input. Both of these require pins 4 and 5 (because these are the data and clock pins). I was wondering if I can use a breadboard to simply connect these two pins to both devices in order to provide both of them with data and clock pins.</p>

<p>I am using an Arduino UNO and a playstation 2 controller with the following guide:
<a href="http://www.techmonkeybusiness.com/using-a-playstation-2-controller-with-your-arduino-project.html" rel="nofollow noreferrer">http://www.techmonkeybusiness.com/using-a-playstation-2-controller-with-your-arduino-project.html</a></p>
 10794: <p>You are confusing pins here. In the library you mention there is a function call to set up the gamepad:</p>

<pre class="lang-c++ prettyprint-override"><code> ps2x.config_gamepad(5,4,3,2, false, false);
 //setup pins and settings: GamePad(clock, command, attention, data, Pressures, Rumble)
</code></pre>

<p>That is <strong>digital</strong> pins 5, 4, 3 and 2.</p>

<p>I2C uses <strong>analog</strong> input pins A4 and A5 on the other side of your Uno board.</p>
