Using 2 LDR at the same time with 2 different inputs

Hello,

as I’m new to Arduino I’m having trouble with setting up 2 analog inputs to register.
I’m using 2 LDRs in my scheme, one is working perfectly, while the other one is always reading the same number, no matter what. I am following a tutorial to add new code lines, maybe I’ve made a mistake by adding wrong line or something.
Changing the input pin changes nothing. Tested my sensors, both of them are working fine, I just can’t get arduino to read both A0 and A1 correctly ( A0 always gives back good results, A1 repeats the same 15 value over and over again)
My code

//set pin numbers
//const won't change
const int ledPin = 13;   //the number of the LED pin
const int ldrPin = A0;  //the number of the LDR pin
const int sviesa = A1; //to read LDR 2
const int dayLight = 12; // daylight pin
const int headLight = 8; // headlights pin


void setup() {

  Serial.begin(9600);
  pinMode(ledPin, OUTPUT);  //initialize the LED pin as an output
  pinMode(ldrPin, INPUT);   //initialize the LDR pin as an input
  pinMode(dayLight, OUTPUT); //
  pinMode(headLight, OUTPUT); //
  pinMode(sviesa, INPUT); // 
}

void loop() {

  delay(10);
  int ldrStatus = analogRead(ldrPin);   //read the status of the LDR value
  delay(10);
  int dayHead = analogRead(sviesa); // read LDR 2 value
  delay(10);

  //check if the LDR status is <= 300
  //if it is, the LED is HIGH
   if (dayHead >=300) {
    digitalWrite(headLight, LOW);
    digitalWrite(dayLight, HIGH);
    
    Serial.println(sviesa);
     delay(10);
   }
   else {
    digitalWrite(dayLight, LOW);
    digitalWrite(headLight, HIGH);
     
    Serial.println(sviesa);
     delay(10);
   }
   if (ldrStatus >=300) {

    digitalWrite(ledPin, HIGH);               //turn LED on
    //Serial.println(ldrStatus);
     delay(10);
    
   }
  else {

    digitalWrite(ledPin, LOW);          //turn LED off
    //Serial.println(ldrStatus);
     delay(10);
  }
  delay(1000);
}

Tried to write a code using only A1 pin, yet the results are same. The println function keeps giving me a value of 15

15
15
15
15
...

const int sviesa = A1;
const int dayl = 12;
const int headl = 8;
void setup() {
 Serial.begin(9600);
 pinMode(sviesa, INPUT);
 pinMode(dayl, OUTPUT);
 pinMode(headl, OUTPUT);

}

void loop() {
  int dayhead = analogRead(sviesa);
  delay(10);

  if (dayhead >=300)  {
    digitalWrite(dayl, LOW);
    digitalWrite(headl,HIGH);
     Serial.println(sviesa);
    delay(100);
  }
  else  {
    digitalWrite(headl,LOW);
     digitalWrite(dayl, HIGH);
      Serial.println(sviesa);
    
    delay(100);
  }
delay(1000);
}

You are printing the pin number (sviesa) not the value you read from it (dayhead).

Steve

Thank you!

Don't know how I missed this...

Thanks again!