Help me, speed with hc-sr04

try changing delay(1) to delayMicroseconds(8);

I don't see where you are trying to calculate speed?