Button pin variable control question

Arduino forum
Hey guys,
So I'm still messing around with the arduino nano. I have a switch hooked up to the interrupt on an mpu6050 pin and the reset pin on the nano.

I'm trying to assign a variable to the pin so when I press the button it just changes the value of the variable between 0 and 1. But it just keeps resetting the mpu6050. Should I hook it up to a different pin on the nano? If so, how would I tell the pin to change the variable when I press the button? Thanks guys!
SR

I can't make sense of the question. I suggest you explain more clearly what you're trying to do. If you want to assign the state of an Arduino input pin to a variable then just call digitalRead() and assign the result to the variable. But you can't use the Arduino reset pin as a digital I/O pin (unless you do complicated things with fuses) and it's not clear why you would want to. The only thing the reset pin is good for is resetting the Arduino, so if that isn't what you're trying to do, you're using the wrong pin. So it comes down to this:

What are you actually trying to do, exactly?

Have you looked at:

http://playground.arduino.cc/Main/MPU-6050

?

I am trying to make it so when I push a button a variable, pina2 = true or false. True when the button is pushed, false when the button is not pushed. I hope that makes sense. I'm just a beginner programming.

True when the button is pushed, false when the button is not pushed.

Well that is nice and all (and if you were to post some code, including something either hardware or software to indicate you were debouncing the button, I'm sure we could help you with that) but what does it have to do with the MPU6050 and as PeterH asked,

What are you actually trying to do, exactly?