user70607: Im a complete beginner
Im making a project using relay modules and arduino. but all the digital pins of my arduino are filled.
I wanted to ask if i can use the analog pins to connect my relay module to my arduino? If yes can anyone give me the statements to write high and low using analog.

user68788: Yes, you can  use the analog pins as digital pins.
Quoting this Arduino tutorial:
pinMode(A0, OUTPUT);
digitalWrite(A0, HIGH);

EDIT:
Here is the code snippet for digital input:
pinMode(A0, INPUT);
digitalRead(A0);


70607: <p>Im a complete beginner</p>
<p>Im making a project using relay modules and arduino. but all the digital pins of my arduino are filled.
I wanted to ask if i can use the analog pins to connect my relay module to my arduino? If yes can anyone give me the statements to write high and low using analog.</p>
 68788: <p>Yes, you can  use the analog pins as digital pins.
Quoting this <a href="https://www.arduino.cc/en/Tutorial/Foundations/AnalogInputPins" rel="nofollow noreferrer">Arduino tutorial</a>:</p>
<pre><code>pinMode(A0, OUTPUT);
digitalWrite(A0, HIGH);
</code></pre>
<p><b>EDIT:</b><br>
Here is the code snippet for digital input:</p>
<pre><code>pinMode(A0, INPUT);
digitalRead(A0);
</code></pre>
