# simulate pin as connect nowhere

I am designing a measurement system based on a single pin. When the pin is connected to GND, it means move right. If the pin is not connected to anything, no action happens.

The system was contolled by button switch originally, but I want to control it with a mouse such that when the mouse moves right, the pin is connected to GND, and when the mouse don't move, the pin is connected to nowhere.

I have tried to connect the pin to an Arduino UNO's 3rd pin. Whenever mouse's rightward moving is detected, the 3rd pin should be connected to ground. When the mouse's moving is something else than rightward, the Arduino UNO's 3rd pin should work as if it was not connected.

I think that making the 3rd pin act as GND can be done by analogWrite(3,0), but how can I simulate "connected nowhere"?

• Did you copy and paste this from somewhere? The formatting it horrible, can you make it easier to read? – Kellenjb Jun 12 '11 at 18:10
• @Kellenjb - fixed. – Kevin Vermeer Jun 20 '11 at 19:18