Coding the Uno to act as a switch

This has probably been answered a 100 times but not knowing how to search the forum, here goes. Rather than build some logic, is the a way to program the Uno to act as a switch. eg: connect pin x with pin y, etc

Without Logic, it won't be possible. But you can write code to check which pin connected to which. You should share more details about your project, what you want to achieve?

jackthomson42: But you can write code to check which pin connected to which.

I'm keen to see it...