Reading buttons, limit switches, relays

Hi, I am having trouble reading a limit switch. I need to know the correct wiring from a switch to a digital i/o pin. I am using a bs2 micro-controller. I am using a the lynmotion bot board 2.
Can someone give me a wiring configuration.

Thanks
Brad