Button as a Shutter

Hello ,

I am working on a camera right now but I am quite newbie in coding.
I want to use button as a shutter.

When you press the button once the process has to start and the shutter has to disabled in this period.
But i didn’t figure out how to code this.

I want to use button as a shutter.

A switch would actually work.

When you press the button once the process has to start and the shutter has to disabled in this period.

Pressing the switch is to disable the shutter?

How have you got the "button" sewn on? How is the switch wired?

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.

For examples of code using timing look at several things at a time.

Basically record millis() or micros() when the button is pressed and do the next step when enough millis or micros have elapsed.

...R

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.

batuhankeskiner:
It's gonna be a pinhole camera. I am just using servo for shutter mechanism to open the pin (for the exposure).

Interesting project.

You should get most of what you need in Reply #3. You might also look at planning and implementing a program

...R