How can I use Arduino Uno Analog Pins as Digital pins, So that I can Attach more components like sensors to the Arduino? My 13 pins are preoccupied and I want more.
Asked
Active
Viewed 34 times
1
-
with `digitalWrite` and `digitalRead`. what is your question? https://www.arduino.cc/reference/en/language/functions/digital-io/digitalwrite/#_notes_and_warnings – Juraj Oct 29 '20 at 09:33
-
For Arduino Uno – Amit Nikhade Oct 29 '20 at 09:38
-
yes for Uno. you tagged the question with [arduino-uno] – Juraj Oct 29 '20 at 09:43
-
Can you provide me any code sample as an instance – Amit Nikhade Oct 29 '20 at 09:49
-
Any of the analog pins (with exception of A6 and A7) can also be used as digital pins, just like any other pin of the Arduino. Just use `pinMode()`, `digitalWrite()` and `digitalRead()` on them, as you like. – chrisl Oct 29 '20 at 09:51
-
Thank you Juraj and chrisl – Amit Nikhade Oct 29 '20 at 10:27