turning a camera on

I am controlling a small digital camera, using a lilypad. I soldered a wire to either side of the button that turns the camera on and measured the voltage between these two wires. The voltage is 320 when the camera is on. I ended up only connecting the positive wire to the microcontroller and setting the pin as input. To turn on the camera, I change the pin to output (low) momentarily and back to input. I am doing this because it's the only thing that works.

I am wondering if setting the pin to input might drain the battery on the camera or cause other problems. Setting the pin to output (high) then momentarily low then high again does not work, nor does low, high, low...

Setting the pin to input puts it into a high-impedance state (high impedance at DC more or less means infinite resistance which means open circuit). We've used exactly that method - take a pin from input/hi-Z to output-low - to trigger a camera whose button effectively shorted a conductor to ground.

If you're really concerned you can use an optoisolator, but you've apparently already tried it with no apparent ill effects, so it looks like you're good to go.

-j

you may be able to power the camera off the arduinos 3.3 volt output