Determining resistor value for using a pushbutton

Hi there, how can i determine the value of a resistor if i want to use a push button with arduino, the button says it can handle 125volts 3A.

Thanks

Juan

If the pushbutton is used as an input, you just enable the internal pull-ups on the input pin thus:

  pinMode (pin, INPUT_PULLUP) ;

and connect the pushbutton from the pin in question to GND.

If you use an external pull-up (or pull-down) then any value from 1k to 100k will work, lower values are more reliable in electrically noisy environments or when the button is mounted remotely.