How can I add a bumper switch to the Pi?

What would be the simplest way of wiring a bumper switch to my GoPiGo? Would it be wired through the Pi’s GPIO port? And then how would I read the state from Python?

Any help/web links appreciated… All the info I can find is using breadboards etc, but I’m sure that’s a bit over the top just for a simple switch.

Update: I’ve found this link: http://razzpisampler.oreilly.com/ch07.html which explains exactly what I want to do, but Doh! …The GoPiGo is connected to the GPIO port obviously.

So back to my original question: is there a simple way of adding a two state switch to the GoPiGo?

Hey Jedipi, the easiest way to do this would probably be to mount this sensor to the GoPiGo:

http://www.seeedstudio.com/depot/Grove-ButtonP-p-1243.html

There are grove ports on the GoPiGo and they can be read with the python examples we have for the GoPiGo.

Sounds like a fun project! What’re you working on?