A6 & A7 only do analog inputs. If you want to use as digital, you must do analog read, and then make decision to treat ther result as low (<=0.3VCC Max if Vcc >2.4V, see Note 1) or high (>=0.6VCC Min if Vcc>2.4V, see Note 2)
- “Max” means the highest value where the pin is guaranteed to be read as low
- “Min.” means the lowest value where the pin is guaranteed to be read as high
So with Vcc = 5V, a low would be 0 to 1.5V, and a high would be 3 to 5V.
1.5 and <3 would floating, in transistion, unknown.
With Aref at 5V, 1.5V/4.88mV/bit = a reading of ~307,
and 3V/4.88mV/bit = a reading of ~614.