Measuring time between two photoresitors and printing time on lcd


i working on project supposed record time difference between 2 photoresistors 4in apart. photoresistors sensing passing of water or other liquids on chute/ramp.

i have looked online , haven't seen similar project. want able display time difference on lcd.

i have lcd , running i'm not sure how code time difference. photoresistors connected a0 , a1 , using digital pins 7-12 lcd. if has advice appreciated!

i'm sure missed ask clarifying questions thanks!

basically this:
code: [select]

if ((digitalread(sensor0) == low) && (timecheckin progress == 0)){
starttime = micros();
timecheckinprogress = 1;
}
if ((timecheckinprogress == 1) && (digitalread(sensor1) == low)){
endtime = micros();
timecheckinprogress = 0;
duration = endtime - starttime;
serial.println(duration);
}


Arduino Forum > Using Arduino > Sensors > Measuring time between two photoresitors and printing time on lcd


arduino

Comments

Popular posts from this blog

Flip address is out of range arduino uno r3

Arduino Uno not uploading

Indesign and MathType fonts