Problems with ultrasonic sensors

Me and my friend wanted to make a sumo robot, but turns out that we don't have enough digital ports on our aduino UNO. So we set the ultrasonic sensors (hc-sr04) on the analogic ports and our L298n dual-H bridge on the digitals. we didn't know how to power the sensors cause they need 5V to work and we had to use 4 of them and the arduino has only space for one. We made a voltage reductor with a voltage regulator 7805 and a 100mfd condenser to power them with the 9v batteries. So we checked with a tester and the sensors are getting 6v and the one contected to the arduino only gets 4.5v. And we used the following code:

#define echo4 A1
#define trig4 A0
#define echo2 A3
#define trig2 A2
#define echo3 12
#define trig3 11
#define echo1 4
#define trig1 3
long duracion, duracion1, duracion2, duracion3 ;
long distancia = 0,distancia1=0, distancia2=0,distancia3=0;

// motor one
int enA = 10;
int in1 = 9;
int in2 = 8;
// motor two
int enB = 5;
int in3 = 7;
int in4 = 6;

void setup(){
pinMode (trig1, OUTPUT);
pinMode (echo1, INPUT);//Ultrasonido
pinMode(enA, OUTPUT);
pinMode(enB, OUTPUT);
pinMode(in1, OUTPUT);
pinMode(in2, OUTPUT);
pinMode(in3, OUTPUT);
pinMode(in4, OUTPUT);

}
void loop () {
digitalWrite(trig1, LOW);
delayMicroseconds(2);
digitalWrite(trig1, HIGH);
delayMicroseconds(10);
digitalWrite(trig1, LOW);
duracion = pulseIn(echo1, HIGH);
distancia = (duracion / 2) / 29;

digitalWrite(trig2, LOW);
delayMicroseconds(2);
digitalWrite(trig2, HIGH);
delayMicroseconds(10);
digitalWrite(trig2, LOW);
duracion1 = pulseIn(echo2, HIGH);
distancia1 = (duracion / 2) / 29;

digitalWrite(trig3, LOW);
delayMicroseconds(2);
digitalWrite(trig3, HIGH);
delayMicroseconds(10);
digitalWrite(trig3, LOW);
duracion2 = pulseIn(echo3, HIGH);
distancia2 = (duracion / 2) / 29;

digitalWrite(trig4, LOW);
delayMicroseconds(2);
digitalWrite(trig4, HIGH);
delayMicroseconds(10);
digitalWrite(trig4, LOW);
duracion3 = pulseIn(echo4, HIGH);
distancia3 = (duracion / 2) / 29;

if (distancia <= 100|| distancia1<=100 || distancia2<=100 || distancia3<=100 || distancia >= 0 ||distancia1>=0 ||distancia2>=0||distancia3>=0){
digitalWrite(in1,LOW);
digitalWrite(in2,HIGH);
analogWrite(enA,150);
digitalWrite(in3,HIGH);
digitalWrite(in4,LOW);
analogWrite(enB,150);

}
if (distancia <= 10 && distancia >= 1){
digitalWrite(in1,LOW);
digitalWrite(in2,HIGH);
analogWrite(enA,255);
digitalWrite(in3,LOW);
digitalWrite(in4,HIGH);
analogWrite(enB,255);
}
if (distancia1 <= 10 && distancia1 >= 1){
digitalWrite(in1,LOW);
digitalWrite(in2,HIGH);
analogWrite(enA,180);
digitalWrite(in3,LOW);
digitalWrite(in4,HIGH);
analogWrite(enB,-180);
}
if (distancia2 <= 10 && distancia2 >= 1){
digitalWrite(in1,LOW);
digitalWrite(in2,HIGH);
analogWrite(enA,-255);
digitalWrite(in3,LOW);
digitalWrite(in4,HIGH);
analogWrite(enB,-255);
}
if (distancia3 <= 10 && distancia3 >= 1){
digitalWrite(in1,LOW);
digitalWrite(in2,HIGH);
analogWrite(enA,-180);
digitalWrite(in3,LOW);
digitalWrite(in4,HIGH);
analogWrite(enB,180);
}

}

I don't know if it's a problem on our code or if we're making the conections wrong. we conected both our echo and our trig on the analogics and the gnd and the vgg to the condeser and voltage regulator.

You need to

  1. read the how to use this forum sticky to find out how to post code without pissing us off.
  2. include a schematic - which is also told to you in the sticky post.
  3. learn that while you might have one pin that says 5V you can simply wire it to multiple places.

As GrumpyMike said, edit your initial post and place "code" braces before and after your code - and use the preview button to check it.

You did not specify your problem, but looking at the first part of your code...

void setup(){
  pinMode (trig1, OUTPUT);
  pinMode (echo1, INPUT);//Ultrasonido
  pinMode(enA, OUTPUT);
  pinMode(enB, OUTPUT);
  pinMode(in1, OUTPUT);
  pinMode(in2, OUTPUT);
  pinMode(in3, OUTPUT);
  pinMode(in4, OUTPUT);
}

You did not set the pinMode for : echo2 & trig2, echo3 & trig3 echo4 & trig4.

void loop () {
 duracion = pulseIn(echo1, HIGH);
 distancia = (duracion / 2) / 29;
 
 duracion1 = pulseIn(echo2, HIGH);
 distancia1 = (duracion / 2) / 29;
 
 duracion2 = pulseIn(echo3, HIGH);
 distancia2 = (duracion / 2) / 29;

duracion3 = pulseIn(echo4, HIGH);
 distancia3 = (duracion / 2) / 29;

Since u are using the same duration in each calc, u do know all 4 distances will be the same.
Shouldn't u be using duracion1, duracion2 and duracion3 in the last 3 calcs?