can I use a momentary button on a analog pin?

techd:
can I use a momentary button on a analog pin on a Arduino mega 2560. I have seen how to use a pot on a analog pin to change the led's on the bar graph lab and I would like to change the pot to two momentary buttons one to move to the next pin up and one to move to the next pin down. How would I hook it up and how do I need to code it?

It sounds like you don't need analog at all.

In the lab you had a pot hooked up and a bar graph led hooked up to Arduino, both separate? You read the pot then wrote to the bar graph? The only link is the code running in the AVR.

So now you want to replace the pot with 2 buttons? Does that sound hard?