Do you mean you would like to save what the Arduino is seeing through the camera when you hit the button? And do you have a pull up resistor connected to the button?
batuhankeskiner:
I am working on a camera right now
...SNIP....
When you press the button once the process has to start and the shutter has to disabled in this period.
Arduinos generally are not powerful enough for dealing with images.
What camera are you trying to use?
What is the Arduino expected to do.
Usually these are just some sort of intervalometer, so that all the image processing is done in camera, but the OP's requirements are pretty confused at this point.
Well , I am sorry because i explained less than i thought.
It's gonna be a pinhole camera. I am just using servo for shutter mechanism to open the pin (for the exposure).
Actually the workflow is going to be like this
Press Shutter Button > Measure Light with Sensor (for measure exposure time for this scene(t)) > Servo Opens Shutter > Waits for proper exposure time (t) > Servo Closes Shutter > Step or DC Motor winds analog film
So when i was researching codes for buttons i couldnt find smth works for me. (Because i'm really beginner at coding)
I need code for doing this. (Assume that this is the i/o pins digital read connected to shutter button)
000000000100000001111000110011000000001100000000000000000000000000000100000
l x x x x x x x x x x l l
shutter process ends shutter
pressing buttons between shutter and winding shouldnt work.