Making vehicle stop in front of wall using stepper motor and ultrasonic (HELP)

Ah I see, so in my code i should be refering to a second tab that contains the Ping code and that way the regular code can keep running while the second tab runs the code to calculate distance?

Any chance you or someone else can show me how to connect these two/change my current code?

thanks