Going Both Ways

I will do that. Thank you. Why do i need a divider? If i plug ot directly into a0 wont it just see 0v when not connected and 5v when it is. Then just monitor a0 to see if it reads >1 to know it is connected?