Serial monitor value

Hello I’m currently working with 3 sensors, Each sensors outputting the right numbers in this code

const int echoPin1 = 10;  
const int trigPin1 = 11;  
const int echoPin2 = 12;   
const int trigPin2 = 13;  

int lightValue;

float duration, distance1, distance2;

void setup() {
  pinMode(trigPin1, OUTPUT);
  pinMode(echoPin1, INPUT);
  pinMode(trigPin2, OUTPUT);
  pinMode(echoPin2, INPUT);
  Serial.begin(9600);
}

void loop() {

  lightValue = analogRead(A0);
  
  
  digitalWrite(trigPin1, LOW);
  delayMicroseconds(2);
  digitalWrite(trigPin1, HIGH);
  delayMicroseconds(10);
  digitalWrite(trigPin1, LOW);

  duration = pulseIn(echoPin1, HIGH);
  distance1 = (duration*.0343)/2;
  
  digitalWrite(trigPin2, LOW);
  delayMicroseconds(2);
  digitalWrite(trigPin2, HIGH);
  delayMicroseconds(10);
  digitalWrite(trigPin2, LOW);

  duration = pulseIn(echoPin2, HIGH);
  distance2 = (duration*.0343)/2;

  Serial.print("light value is");
  Serial.println(lightValue);
  
  Serial.print("distance is");
  Serial.println(distance1);
  Serial.println(distance2);
  delay(2000);
}

But in this code below,

const int echoPin1 = 10;  
const int trigPin1 = 11;  
const int echoPin2 = 12;   
const int trigPin2 = 13;  

float duration, distance1, distance2;

int lightValue;

void setup() {
  pinMode(trigPin1, OUTPUT);
  pinMode(echoPin1, INPUT);
  pinMode(trigPin2, OUTPUT);
  pinMode(echoPin2, INPUT);
  Serial.begin(9600);
}
 
void loop() {

    for (int thisSensor = 0; thisSensor < 3; thisSensor++) {
      lightValue = analogRead(A0);
      Serial.print(lightValue);

      if (thisSensor == 2) {

          digitalWrite(trigPin1, LOW);
          delayMicroseconds(2);
          digitalWrite(trigPin1, HIGH);
          delayMicroseconds(10);
          digitalWrite(trigPin1, LOW);

          duration = pulseIn(echoPin1, HIGH);
          distance1 = (duration*.0343)/2;
          Serial.println(distance1);
         
      } else {
          digitalWrite(trigPin2, LOW);
          delayMicroseconds(2);
          digitalWrite(trigPin2, HIGH);
          delayMicroseconds(10);
          digitalWrite(trigPin2, LOW);

          duration = pulseIn(echoPin2, HIGH);
          distance2 = (duration*.0343)/2;
          
         Serial.print(",");
      }
   }
       delay(1000);           
}

It’s outputting some weird numbers.
And all I want is get the serial monitor value like (lightValue, distance1,distance2 )

It’s outputting some weird numbers.

Like aleph?
Pi?
Root two?

Like aleph?
Pi?
Root two?

the one I got from my serial monitor is (lightValue,lightValue, and some random numerical values that doesn’t exist in my circuits)

Take a deep breath.
Now,describe what you’re seeing.

Do not use words like “weird” or “odd” or “unexpected”.

Maybe you’re pinging too fast.

Post the weird values here. Nobody except you know how weird it looks like