Uno - Button problem i don't understand

groundFungus:
Pins 0 and 1 are the hardware Serial RX and TX pins. If you use Serial you should not use those pins for anything.

Do you have pull down resistors connected to the switch inputs? Without the pull down resistors, the input is floating (undefined state) when the button is not pressed.

See the state change tutorial.

Karma for code tags on first post. Not many bother to read the guidelines.

i did not use a pull down resistor since i did not need it for another project i did along with a tutorial - i will try this right away

slipstick:
Your code is calling you a liar. It says the buttons are connected to pins 1 and 9. No pin 0.

Try it with pins 9 and 10 and report back.

BTW why do you have functions case0() and case1() which are never used? Just to confuse anyone trying to read your code?

Steve

sorry, i seed to have copied the code when i was trying another pin to compare - that obviously did not make my code more readable.
the functions case0 and case1 are exempted in the main switch for testing, i left them in the code so whoever tried to read it would have more of an idea what i was trying to do... but i understand that that this makes the code more difficult to read - i will remember this when posting in the future

groundFungus:
Here is a better way to wire normally open momentary switches (buttons). You can use the internal pull up resistors this way and the cap adds debouncing. Note that the input will be HIGH when the button is not pressed and LOW when pressed. Adjust logic as necessary.

i will look into this

thanks to all of you for responding so fast