Need some help on a ultrasonic sensor problem

Thank you guys for your response!
Never knew the problem was this simple, it was the 6V I supplied to the barreljack, thinking it also needed 5V instead of 7V. So I set my regulator to 9V and it all works like a charm now! Thank you very much for your help.
Oh and I declare my ping sensor before the setup.

NewPing sonar1(trigPin1, echoPin1, maxDistance); //NewPing setup of pins and maximum distance for
//the first ultrasonic sensor
NewPing sonar2(trigPin2, echoPin2, maxDistance); //NewPing setup of pins and maximum for the
//second ultrasonic sensor

Again, thank you for your help, I was stuck with this for so many hours...