Need advice and Guidance on project how to implement new code

So ive been working on a simple project, not knowing very much code and slowly understanding how i can combine bits an pieces.

That the main goal of my project is to:
detect an input block/object with Adafruit Led Breakbeam
upon detection activate a led
then after a set amount of time turn off led
drop object with servo - by moving a set amount forward and back
and running in a loop

my issue is that the time at which im delaying is manual input with delay function.
I know this is not the best way, as i would like to be able to alter this input with some external up/down buttons or potentiometer, eventually show this onto some display either lcd or basic two 7segments

the code that i have works but not being able to adjust this delay has gotten me stuck as not sure what to implement instead, if someone might know of a term or function or something i can lookup would be unbelievably helpful, as i"m sure to many its quite basic stuff.

Beam_Drop.ino (589 Bytes)

Is your code too long to post between code tags? If so, can you make a short version containing just enough code to illustrate your problem?

0.58 KB ought to fit well. Using a smartphone I can't read Your code. Your bad luck, no help from me.

The hint is - read the instructions, point No. 7, and go back and modify your original post (not re-post it) - using the “More → Modify” option below the right hand corner of your post - to insert your code as such using the “</>” icon in the posting window.

Sorry for not replying didnt get any notifications from thread.
was able to figure it out, but thanks,
also thankyou for letting me know how to post/insert code

If you share the problem you found and how you fixed it, this may help others in the future. And this whole topic will not have been a waste of time.

bportelli:
Sorry for not replying didnt get any notifications from thread.

It's a good idea to check the Forum regularly to see if there are any responses.

It also provides the opportunity for you to help someone else.

...R