Is it possible to use analog pins as digital pins?
Sure, just threshold the input value at a suitable level (e.g.: 0.5)