Need help bypassing pushbutton by having Arduino act as the button

We have a bluetooth board that has 5 buttons for play/pause, next song, previous song, volume up and volume down but we don't want to use the physical buttons. We want to control it using arduino. We soldered wires on one side of the pushbutton and another on the side for ground. The positive side of the pushbuttons we connect to 5 pins on the arduino. The ground wire is connected on the Arduino's ground. The issue is that when we set the pins to output and set them to high initially then send the pins low, they do not work.

Is there a way that we can set the pins to "open" instead of high initially? We came across someone saying to set all the pins as input and then switch to output low when we want the arduino to activate the "button". Do we need to set them as input_pullup?

Here is our idea:

In Setup:

pinMode(pinA, INPUT_PULLUP);

In our function when we want to activate the "button:

pinMode(pinA, OUTPUT);

digitalWrite(pinA, LOW);

pinMode(pinA, INPUT);

We soldered wires on one side of the pushbutton and another on the side for ground. The positive side of the pushbuttons we connect to 5 pins on the arduino. The ground wire is connected on the Arduino's ground.

How do you know that one side of the buttons is "positive"? Have you tested the voltage on each side of the button, compared ground somewhere else on the board?

You could try using opto-isolators. Then, it would not matter which side of the switches is positive or ground or neither, you would not even need a common ground between the board and the Arduino.

jg8:
Is there a way that we can set the pins to "open" instead of high initially? We came across someone saying to set all the pins as input and then switch to output low when we want the arduino to activate the "button".

Correct.

jg8:
Do we need to set them as input_pullup?

No. That would be powering them up to 5 V but just with an effective resistor.

Pins are INPUT and LOW by default. You can write them LOW just "in case" but setting them as OUTPUT will pull them LOW, then setting them to INPUT again will release them as open circuit (but only up to the Vcc of 5 V and only as long as the Arduino is powered. If the power goes off it will be pulling all pins LOW).