You might try attaching an Arduino IO through a resistor to pin 4 (where your red arrow points), and Arduino ground to pin 1 (where your black arrow points). Because the clock is battery-operated, you can connect its ground to the Arduino's ground without problem.
Before attaching the Arduino, use your DVM to measure the voltage between pins 4 and 1, with the switch open and with the switch closed. In following, I'll suppose you have measured 3V when the switch is open and 0V when it's closed. This would indicate that the clock's circuit pulls or drives pin 4 high when the switch is open. In initial experiments, I'd start with a 1KΩ or so resistor (eg, any resistor between 500Ω and 2000Ω) in series with an ammeter and the Arduino IO. If you measure at most a few microamps of current in both the “switch open” and “switch closed” cases (see below) then the circuit should function ok with the resistor in place (since there will be only a tiny voltage drop across it). [If, on the other hand, you measure several milliamps of current in either case, then my ideas about the clock circuit might not apply; in which case you might need an optoisolator or relay.]
To represent switch operation, put the Arduino IO into INPUT mode to represent an open switch, and into OUTPUT LOW to represent a closed switch. For example, in setup()
say
pinMode(ClockPin, INPUT); // Also does digitalWrite(ClockPin, LOW);
and in your loop()
say stuff like
if (TheTimeHasCome) {
for (int k=0; k<4; ++k) {
pinMode(ClockPin, OUTPUT); // Presses the button
delay(50); // Holds the button
pinMode(ClockPin, INPUT); // Releases the button
delay(50); // Wait between buttons
}
The comment // Also does digitalWrite(ClockPin, LOW);
is a reminder that pinMode(ClockPin, INPUT);
has two actions: it sets ClockPin to be an input instead of an output, and takes the corresponding PORTx bit low (ie, resets a bit in PORTB, PORTC, PORTD, or whatever). If we had said pinMode(ClockPin, INPUT_PULLUP);
, then the corresponding PORTx bit would have been set high, and the pin would be weakly pulled to Vcc, eg +5V. It would be a mistake to send 5V to the clock, as it's likely that would exceed its voltage tolerance.
Since pinMode(ClockPin, INPUT);
leaves the appropriate PORTx bit low, there is no need to use digitalWrite()
separately in the sketch. When ClockPin is an input, its high impedance allows the clock to pull pin 4 high; when ClockPin is an output, its 0 level connects pin 4 to pin 1.