HEELLPP! Sketch refuses to loop

so I have written some code to simply calculate speed using the time between 2 pir sensors are triggered and I only get a reading when i first load the sketch to the UNO and thats it. Please check my code below

#include <LiquidCrystal.h>

LiquidCrystal lcd(7,8,9,10,11,12);
//unsigned long start=0, finish=0;
int startPin=A1, finishPin=A2; //done=0;
float distance=36, interval, velocity;

void setup() {
lcd.begin(16, 2);
lcd.setCursor(0, 0);
pinMode(startPin, INPUT_PULLUP);
pinMode(finishPin, INPUT_PULLUP);

void loop() {
unsigned long start=0, finish=0;
int done=0;
startPin = LOW;
finishPin = LOW;

while(!start) {
if(digitalRead(startPin) == HIGH)
start = millis();
while(!finish) {
if(digitalRead(finishPin) == HIGH)
finish = millis();

while(!done) {
interval = float(finish-start);
velocity = (distance10003.28)/(interval*1000);
lcd.setCursor(0, 1);
lcd.print(" ft/sec");
start = LOW;
finish = HIGH;


  while(!start) {

Amazing. You are treating start and finish as:

  1. a time variable
  2. a boolean value to test
  3. a pin output state

What are you really trying to do?

 while(!done) {

How do you expect to ever get out of this loop, given that you never change the value of done?

Ray L.

So you start out with two analog pins, then change to both startPin and finishPin being the same pin 0 and end in the while loop with startPin at pin 0 and finishPin on pin 1. That makes no sense. Maybe you meant to digitalWrite those pins but they're supposed to be inputs so that doesn't make sense either. You take two readings using the same pin try to calculate speed and then trap yourself in an infinite loop. I can't make heads nor tails of what you're trying to do here.