user85089: I need to connect the following devices to an Arduino UNO board. The problem is that I run out of pins to be able to connect them all. Is there any way to do it?

ultrasonic sensor
yellow led
green led
red led
buzzer
keypad 4x4

I'm doing the project in Tinkercad
In the picture below I tried to do it, but I am missing 2 pins for the ultrasonic sensor trig and echo


user42015: As cguck70 already stated in the comments: The pins A0 to A5 can be analog input pins, but they can also be normal digital input/output pins. You can use them to your liking, just like any other digital input/output.
So just connect two of these pins to your ultrasonic sensor and use the pin names A0, A1 and so on in your code.

85089: <p>I need to connect the following devices to an Arduino UNO board. The problem is that I run out of pins to be able to connect them all. Is there any way to do it?</p>
<ul>
<li>ultrasonic sensor</li>
<li>yellow led</li>
<li>green led</li>
<li>red led</li>
<li>buzzer</li>
<li>keypad 4x4</li>
</ul>
<p>I'm doing the project in Tinkercad</p>
<p>In the picture below I tried to do it, but I am missing 2 pins for the ultrasonic sensor trig and echo</p>
<p><a href="https://i.stack.imgur.com/PJLwT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PJLwT.png" alt="enter image description here" /></a></p>
 42015: <p>As cguck70 already stated in the comments: The pins A0 to A5 can be analog input pins, but they can also be normal digital input/output pins. You can use them to your liking, just like any other digital input/output.</p>
<p>So just connect two of these pins to your ultrasonic sensor and use the pin names <code>A0</code>, <code>A1</code> and so on in your code.</p>
