Arduino as a switch

Is this possible in arduino?

Where ‘2’ is the arduino and ‘1’ is just a normal mechanical switch. If so, how can this be done i.e. what pins to connect? Thanks :slight_smile:

You could have the Arduino drive a relay or a transistor, but the Arduino itself can't act as a contact closure.

Don’t see why not in theory - just put the Arduino first and the switch on the digital output from the Arduino. Subject to the normal voltage current limits on the digital output for whatever you are driving.

It would probably be a better solution to connect the switch to a digital input on the Arduino and only activate the digital output if the switch is closed.

Care to share what you are trying to achieve as you might get a better solution again?

Need we say you need a series dropping resistor with that LED?

.

I'm not seeing the image, but seems from answers that I might be the only one not seeing it? That's weird.

edit- Aaaaaand there's the image all of a sudden. Even weirder.

What are you building godsuave?

Thanks for the reply. I will try davidrh's solution. I forgot that digitalRead is a thing lol.

I'm building a device that is connected to the ignition switch of a car, it's basically an ignition interlocking device but is Arduino-based.