Joining pins together

I feel as though this isn't possible on the Arduino, however I'm curious if you can pass through two pins. For example, if a signal is coming to pin 4, some event can trigger it to output the same signal on pin 5.

Thanks in advance

Yes, you can do this, given that the signal coming in is digital (on/off) so you can therefore set another pin to the same value, although I question why you would want to do this!!!

Given that you're new to this Arduino game you may find my YouTube videos helpful in understanding the workings, URL in the footer of this post. Enjoy!

mister_s: I feel as though this isn't possible on the Arduino, however I'm curious if you can pass through two pins. For example, if a signal is coming to pin 4, some event can trigger it to output the same signal on pin 5.

Thanks in advance

It has to be digital, and since you are running a program to copy the input to the output, there will be a delay and a maximum frequency that you can use. Also if you expect to run other code concurrently, it will react even more slowly.

For example, if a signal is coming to pin 4, some event can trigger it to output the same signal on pin 5.

  • Setup pin 4 as an input.
  • Setup pin 5 as an output.

  • Read pin 4 into a variable.

  • Write the variable to pin 5.

  • Loop if desired.

(Or, you can read & write "directly" in one statement without assigning a variable.)

As arrg says, there will be a delay depending on when you read & write and depending on what else your program is doing when it's not executing those particular steps.

Alright thanks for the help