Button equivalent

Hi! I'm just starting to play with arduino and I'm trying to hack an RC car. I already figured out how the rc works (I want to use to the arduino to control the rc, not the car itself). Basically I just have to make two wires touch to give a command (left, right, forward or back), if I use a button to connect the wires it works perfectly but I want to control it from my pc sending commands via serial so I need an electronic (or digital? Whatever) button's equivalent which I can "push" (like a button) from the code in running in my arduino.

Could someone please tell me what to use? I know it's probably an easy answer Buy I haven't been able to figure it out.

Thanks in advance to everyone!

Use the forum's search for "button press." This question probably comes up about once a week.

I know it's probably an easy answer

It is not. There is no one answer because the electronics on the thing you want to emulate a button for can be made in many different ways each way will need a different sort of interface. The only "prize every time" answer is to use relay contacts.

I already tried relays but are no good cause using a relay would mean having something connected at all times (forward, back, left or right) unless I used 4 relays, one for each, leaving the other state of the relay leading nowhere...

anyways, I think I found what I was looking for, an opto-isolator. I'm gonna get a few tomorrow and try those. those should work right?

I already tried relays but are no good cause using a relay would mean having something connected at all times (forward, back, left or right) unless I used 4 relays

Without knowing your setup, you'll have to explain to us exactly what that all means. (and why using opto-isolators will be numerically any different)

Relays, by their nature, make it ever so much simpler because you don't have to know voltages or currents or polarity, etc.

Polarity I'll agree with. But, relay contacts are rated for specific voltages and amperage and AC/DC. The voltage and current required to activate the relay/hold it open/closed varies considerably.

Picking the right relay means you better know something about both voltages, both currents, and whether you are switching AC or DC.

I don't completely agree. We get people wanting to switch mains power - 120V or 240V - high current motors as well as people wanting to switch toy RC car motors. The RC car motors I have are pretty high current devices, and a tiny relay isn't going to cut it.

Guys keep in mind the OP is talking about the buttons on the controller and not the actual motors themselves.

Ok... thanks everyone for their advice but I managed to do it with some transistors and can now control the RC car using a wiimote connected to my macbook wich sends data over serial to my arduino to control de RC