How to complete a push button circuit through arduino

I have a car clicker (not sure what it is technically called) that allows through the push of a button the ability to unlock (or another push button lock) the car. I have removed the circuit board and connected two wires to the unlock circuit. If I touch these two wires together it will unlock the car so I have the wires in the correct location.

I would like to run the two wires into the arduino and allow the arduino to complete the circuit to unlock the car. For my prototype I have connected the wire that has voltage to A0. I have connected the wire that has no voltage to A2. I have a pushbotton on a breadboard that I am using as my fake signal to connect the circuit. Unfortunately this is not working. I have posted my code below. When I watch the Serial Monitor says:
START
Button pressed.
169
END

If I disconnect the wires from A0 and A2 and touch them together it will unlock the car.

Any help would be appreciated. (In the end I want to use a BLE shield to have my phone send the A5 button press signal so I can unlock my car using the bluetooth in my phone.)

const int clickerAnalogReadPin = A0;
const int clickerAnalogWritePin = A2;
const int buttonAnalogInPin = A5;

void setup()
{

//start serial connection
Serial.begin(9600);

//configure as an input and enable the internal pull-up resistor
pinMode(buttonAnalogInPin, INPUT_PULLUP);
pinMode(clickerAnalogWritePin, OUTPUT);

}

void loop()
{

Serial.println("START");

//read the pushbutton value into a variable
int buttonValue = analogRead(buttonAnalogInPin);

// when the sensor value is below 1000 that means the button was depressed.
if (buttonValue <= 1000)
{

Serial.println("Button pressed.");

//read the value from the unlock upper right pin
int unlockValue = analogRead(clickerAnalogReadPin);
int outputValue = map(unlockValue, 0, 1023, 0, 255);
//int unlockValue = 175;
Serial.println(outputValue);
analogWrite(clickerAnalogWritePin, outputValue);
}
else
{
Serial.println("Button not pressed.");
analogWrite(clickerAnalogWritePin, 0);
}

Serial.println("END");
delay(2000);
}

RaxDominion:
I have a car clicker (not sure what it is technically called) that allows through the push of a button the ability to unlock (or another push button lock) the car. I have removed the circuit board and connected two wires to the unlock circuit. If I touch these two wires together it will unlock the car so I have the wires in the correct location.

I would like to run the two wires into the arduino and allow the arduino to complete the circuit to unlock the car. For my prototype I have connected the wire that has voltage to A0. I have connected the wire that has no voltage to A2.

Try connecting that wire to the Arduino ground.

Which wire would you connect to ground? The wire with voltage or the wire without?

How many volts is it? How much current passes when you short the wires?

More than 5V or more than 40mA will kill your Arduino.

I am powering the clicker using the 3.3v out and ground on the arduino.

I used a voltmeter to connect the two wires on the circuit for the clicker and got back 3.27v which seems right as it is close to 3.3v. I translated 3.3v to ~170 for the analogread. If you look at my code it is writing 169 to the serial monitor so it all seems to line up. It just won't actually unlock.

Oh, you're using analogWrite().

Arduino "analog" pins can't output analog values, only read them. They also work as digital pins.

Connect the wire with no voltage to GND instead of A2.

Do this to unlock the car:

pinMode(A0,OUTPUT);
digitalWrite(A0,LOW);