A0 (Analouge to Digital? In)

Anyway of converting the unused A0/A1 (analouge input pins) to plain old Digital Pins?.

I could do analougeRead(a0.... and if value is 1024 { perform routine }

that should work, but checking for digitalRead is easier?

Yes.

http://arduino.cc/en/Reference/DigitalRead

All three pages say:

Note
The analog input pins can be used as digital pins, referred to as A0, A1, etc.

For those too lazy to read the manual:

pinMode(A0,INPUT);
x = digitalRead(A0); // x == LOW or HIGH

and if value is 1024 { perform routine }

Your Arduino is very badly damaged if an analogRead returns 1024.

Note, on some variants (e.g. Nano) A6 and A7 are simply inputs to the analogue input multiplexer and cannot be used as digital pins.

majenko:
For those too lazy to read the manual:

pinMode(A0,INPUT);

x = digitalRead(A0); // x == LOW or HIGH

Which i very much am, Thanks folks! :slight_smile: