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)