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

Help with codes to add 1 more shift register and add more to matrix LED

tcp client

Is there an HTML component in Flex 2.0?