Single pin as input and output Is there a way to set an Arduino pin as being both an input, and an output?

I was looking at tristates, I'm not sure if that is related, or if there is some other method.

Perhaps I can try switching states rapidly. on one pin. I'm just not familiar with how to do it, and I don't see anything about it on the Arduino site. 

This is a function of other microcontrollers, such as PICs, but I'm not sure about AVRs and Arduino types.
The source code for the 1-Wire protocol is a great place to start when learning how to use a single pin for both input and output. 

See also chap. 18. I/O-Ports in the ATmega328p datasheet. 

Cheers!