rubber buttons

I want to use something like this: http://image.dhgate.com/albu_210734177_00-1.0x0/electric-conduction-rubber-replacement-for.jpg

The thing is, when i want to use push buttons i have this options: - I configure the arduino pins to OUTPUT mode - this avoid me to use pull up\down resistors (which i prefer to use) - I configure the arduino pins to INPUT mode - this force me use pull up\down resistors (meh)

So the problem is, I'm not able to use the OUTPUT mode technique because these rubber buttons are more resistant than the internal resistors of the Atmega when i configure them to OUTPUT, so it will always tell me that i'm not pressing the button.

And i don't wanto to solder a resistor for each pin,only if i need to, which i think is not the case.

Well, calculators, remote controls, and etc. use this rubber buttons, and there's not resistor for each button, they only use a matrix connected to the IC, so how can i do the same?

Push buttons are input devices. Why would you configure the pins as output devices? Why not simply set the pins to input and enable to internal pullups?

Hum, how do i do that?

tsunamy_boy: Hum, how do i do that?

Google knows!

Arrch:

tsunamy_boy: Hum, how do i do that?

Google knows!

pinMode(2, INPUT_PULLUP); right?

It worked just fine, but i have to revert the value since there's no internal pull down. One question, can i use this to wake up the atmega on sleep modes?

Thanks for your time :)

tsunamy_boy: It worked just fine, but i have to revert the value since there's no internal pull down.

All that means is switching the HIGHs and LOWs in your code. Not exactly an insurmountable task...

One question, can i use this to wake up the atmega on sleep modes?

An internal pullup cannot wake the atmega. If you mean can you use this in conjunction with an ISR to wake the Arduino, then yes.

Sorry, what you mean about ISR? Thanks

"Interrupt service routine" The function the Arduino executes when it wakes up.

oh ok thank you guys, i got my answer, i'm going to investigate about it. have a nice day