distance1 = ultrasonicRead(); //calls ultrasoninicRead() function below
delay(1000);//giving a time gap of 1 sec
distance2 = ultrasonicRead(); //calls ultrasoninicRead() function below
//formula change in distance divided by change in time
Speed = (distance2 - distance1)/1.0; //as the time gap is 1 sec we divide it by 1.
//Displaying Speed
Serial.print("velocidad en cm/s :");
Serial.println(Speed);
I was trying this way but the "ultrasonicRead ()" does not recognize me