Using an ARDUINO Analog input for use as Digital inputs, requires using the 'analogRead(An)' function, and carrying out a 'compare' of the value with a number where Above indicates 'ON' and Below indicates 'OFF' ... this diagram indicates 3 such types of method using Resistors ... the resistor values are not critical, as long as the switch changes the voltage enough for detecting High and Low values. There are several other methods to use Analog inputs for Digital use, but I only indicate 3 here.