I read somewhere that the GPIO pins when set to input include a pull-up resistor. this would mean that all you need is a switch to ground.
someone more expert would be able to confirm the pull-up status.
Ok, slowly building a clearer picture I hope.
1. An old post from JamesH (http://www.raspberrypi.org/for.....-2/#p26929
) mentioned there were no pullups. I think gert mentioned this too. For now I"ll stick on the safe side and assume that is right, I take it there isn"t any major implications for experimenting circuits if you add extra pull-ups and pull-downs (obviously if you over do it, it just won"t see any changes).
2. As I suspected, the resistor directly connected to the pin is to protect in case you set the pin to an output instead [ref:http://www.ladyada.net/learn/a.....sson5.html
]. Since it would still only connect to GND it shouldn"t be a major issue (I assume the RPi wouldn"t supply enough current to destroy itself) but since we are going for safe design (and a resistor is a minimal cost to include) I"ll keep it in the circuit. Value, looks to be about 100ohms, (I=V/R so 3.3/100 gives 33mA) which is probably ok, although I guess it could be even larger, say 470ohm (7mA).
While we are talking about it – the comments on the source and sink currents which gert made [ref: http://www.raspberrypi.org/for.....-3/#p18870
, suggests to me they can be quite high, but you risk interfering with the operation and timings on the other pins, so if in doubt, keep it low. Clearly I can't be totally sure until I can re-test everything on a real RPi.
I still don"t know of any official values, but I am aiming for about 10-5mA for circuits which don"t need any specific amount i.e. swtiching/signals etc.
As always, please correct anything I may have wrong…