specifying digital or analog pin?

I have a MEGA 128 that has two sets of 0-15 pins, the analog ones and the digital ones.

How do I specify what pin is used? :~

How do I specify what pin is used?

The function you use defines that. The analogRead() function reads the analog pins. The digitalRead() doesn't.

I though I needed to specify what the pins are used for?

Like this:

pinMode(select_button_pin, INPUT);
pinMode(zone_1_sensor, INPUT);

The pinMode function defines whether a given pin that can be input or output IS input or output. The analog pins are input only, so there is no need to call the pinMode function to say that an analog pin is an input pin.

That makes sense for the analog, should pinMode then be set for all the digital I/O that can go each way?

should pinMode then be set for all the digital I/O that can go each way?

For all the ones that matter, yes. If the pin isn't used, there's no reason to set the mode.

Thanks 8)