Latch an output pin?

Alright, now it's time to ask a really stoopid question.

I have some outputs going to this god forsaken fingerprint scanner. I need to simulate button presses on a circuit that is normally closed. So there's always 3.3v supplied to their inputs, and you just open the circuit for more than 30ms to enable that function.

For example, this code would do it, but clearly it's not a workable solution:

void loop()
  boolean latch = true;
    // break this loop somehow
  long millisStart = millis();
  while(millis() < (millisStart + 30)){

So what's a real method you can use to hold an input high until you say otherwise?

Sorry to ask such a silly question...

Can I use a transistor of some description as a switch and have the circuit set up so that the Vcc is NC and then open it when I apply a voltage to the Base? Kind of the reverse of an NPN transistor that I'd normally use to drive a high powered device. I dunno if that even makes sense (to me it does!).

Further explanation: I normally have an NPN transistor set up with the pin from the Arduino going to its base, the emitter going to ground and the collector connected to the positive wire of the device.

In my little head I can see the emitter as one side of the "switch" (but not going to ground) and the collector as the other side of the "switch". And obviously the base is still connected to the Arduino. Without voltage, the circuit needs to be closed and open the circuit when the voltage is applied. The catch is, I have nothing going to ground.


An output pin already stays at the value you last set it, until you set it to something else.

Uh oh. I think my brain is broken. :-[