Quick question, i'm looking at pushbuttons integration with current projects. Ive noticed there are two (2) different methods to people have been using.
the conventional approach is to connect the button between the pin and ground, configure the pin as INPUT_PULLUP to use the internal pullup resistor which pulls the pin HIGH and for the button to pull the pin LOW.
Note: Your second diagram is wrong. The pull-up resistor goes between the pin and +5V, not between the pin and button switch. The external pull-up can be replaced with the internal pull-up.
An INPUT pin connected to a switch must have a pull-up or pull-down resistor or the value will float randomly between LOW and HIGH when the switch is open.
The input pullup resistor limits the current, you don't need the external resistor at all. You can consider them to be around 50k Ohms, although the value is no accurately specified.
You only need a current-limiting resistor between the pin and a load if the pin is set to OUTPUT. For a pin that is INPUT or INPUT_PULLUP you can connect it to Ground or +5V without a problem. If you fear that a bad sketch will set your pin to OUTPUT you can add a current-limiting resistor but 10k (0.5 mA) is excessively high resistance and may cause input problems. Use more like 240 Ohms. That will limit the current to a safe 21 mA and still allow your INPUT_PULLUP pin to work reliably.
ok so a 10k resistor to 'act' as an internal pullup and because PIN 34 and 35 are set as anINPUT when the button is pressed the PINs wont draw excessive mA?
In using a switch or push button to provide a digital input to the Arduino we basically have two options as shown here; to connect one side of the switch or button to the ground 0V rail - or to connect it to the +Vcc rail. The usual (MUCH better) choice is to use a ground connected "normally open" button or switch. This has many advantages - but the "active" (pressed) condition of the button results in a logic "0" and inactive or released condition gives a "1".
It explains why using method 1 is potentially unsafe, and the design choices in choosing input circuits.
You may also want to look at this if switch bounce will be an issue.