Adding new Input GPIO

HI:
I want to add a new input gpio ,but ,how can i to read and deal with it ?

Imported from wikidot

Hi John,

what do you want to do with the input pin?

oh, I want to control others by input pin with senser. Now ,I don’t know where can i to set input pin and read it .Also , I can do something when it is high,if not ,i can do other things.
Now ,I am so tired with it, Can you help me ? I am waiting for your answer,thanks a lot.

Have you seen this : http://smoothieware.org/switch ? It seems to do exactly what you want.