I read somewhere that not all Arduino Nano analog inputs can be used as digital inputs. I seem to remember A6 as one of them.
Can someone tell me what analog pins to avoid trying to use as digital input, thanks
I read somewhere that not all Arduino Nano analog inputs can be used as digital inputs. I seem to remember A6 as one of them.
Can someone tell me what analog pins to avoid trying to use as digital input, thanks
How about reading the documentation?
The Nano has 8 analog inputs, each of which provide 10 bits of resolution (i.e. 1024 different values). By default they measure from ground to 5 volts, though is it possible to change the upper end of their range using the analogReference() function. Analog pins 6 and 7 cannot be used as digital pins. Additionally, some pins have specialized functionality:
I2C: 4 (SDA) and 5 (SCL). Support I2C (TWI) communication using the Wire library
ZOR2:
Can someone tell me what analog pins to avoid trying to use as digital input, thanks
with Atmega328 based boards providing 6 analog pins (A0...A5) you can use all of the six analog pins the same as digital pins (input or output).
with Atmega328 based boards providing 8 analog pins (A0...A7) you can use the first 6 analog pins (A0...A5)the same as digital pins (input or output).
So no matter whether your Atmega328 board has 6 or 8 analog pins, you always can use 6 analog pins (A0...A5) as digital pins.
But be aware: A4 and A5 on Atmega328 based boards is the I2C bus, so if you want to use A4 and/or A5 for I2C, avoid using the same pins for anything else!
Thanks for the link Whandall, had not seen that before.
Thanks jurs, that clears it perfectly..