Xone

i have a pressure sensor hooked up to A0, a servo hooked up to pin 9, and two buttons, each should make the servo do what i tell it. the first button works but the second one doesn't?? i know someone can help.

Is your pressure sensor wired as a voltage divider ? If its just wired in series between 5v and the analog pin, it is probably behaving as a floating input and whether it gives a high or low is a complete lottery.

http://pluggy.is-a-geek.com/index.html

Xone

ok ill explain futher. this is a code to control the servo i have mounted on a turbo charger. the pressure sensor reads the amount of boost and opens and closes the waste gate using the servo. the servo only moves if the turbo has reached the desired pressure of 25psi. the two buttons im talking about act like over rides i guess you could call them. no matter what the pressure is i want the buttons to make the servo go to the position i programed on them. now the weird thing is, one of the buttons work but when i push the other on it doesnt do anything and i used the same method as i did programing the first one?

I sense that you are frustrated that you program/hardware is not working. But, it isn't helping your situation if you don't answer the questions that are asked.

Do you know what range of readings you are actually getting from the pressure sensor? Is a value over 800 reasonable?

Do you know that the switches are wired correctly? Not because you have looked at the wiring 1000 times, but because you have printed data to the serial port, and the data is consistent with the state of the switches.