Help with LDRs

I am relatively new to arduino projects, and are wondering what is the problem. When I try to test out the LDR by using the code below, it is outputting as low digits. When there are no lights, it hits 0, but under a large amount of light only makes it rise up it ~25. Why is it hitting a max of ~25 when the max is 1024? There are no error messages when verifying the code, and the ram usage in the arduino is fine.

The LDR has a resistance of 0.2 mΩ
The Resistor has a resistance of 22k Ω

The attachment below has the fritzing schematics of our setup.

void setup() {
  // initialize serial communication at 9600 bits per second:
  Serial.begin(9600);
}

// the loop routine runs over and over again forever:
void loop() {
  // read the input on analog pin 0:
  int sensorValue = analogRead(A1);
  // print out the value you read:
  Serial.println(sensorValue);
  delay(30);        // delay in between reads for stability
}

Show us a good image of ‘your’ circuit wiring.
Posting images:

You most likely do not have the LDR wired right. According to your diagram the analogRead should be near 1023 when dark and toward 0 when lit.

Edit: As pointed out red for ground. I saw it backwards. My bad.

A photo of your wiring might be helpful.

Interesting wiring colour code: red for ground and blue for 5V?

You need to take the LDR out and measure it’s resistance under the lighting conditions you want . Then calculate a resistor value to give higher readings from the Arduino . Google “resistor divider “ and with a 5v supply ; experiment with values until you get a voltage range nearer what you want .

arduin_ologist: Interesting wiring colour code: red for ground and blue for 5V?

Yes I found this sort of confusion in foreign students when I lectured at a UK university. It is so ingrained in western culture, this red and black / blue thing but I guess it is not universal.

But the really odd thing, is using the red wires on the breadboard's blue rail, and blue wires on the red rail.

Flamestask: The LDR has a resistance of 0.2 mΩ The Resistor has a resistance of 22k Ω

I think you mean 0.2 MΩ? 'm' is for milli, ie 1/1000th of an ohm! 'M' is mega, ie one million.

The LDR has a resistance of 0.2 mΩ The Resistor has a resistance of 22k Ω

So that means the LDR is 200K and so the resistor should be in the same ball park say 220K to get a good swing.

After checking, it is 0.2MΩ for the LDR. After changing an LDR with 8-20kΩ I am still receiving low numbers from my LDR through the serial monitor. What is going wrong here?

What is going wrong here?

Something you are not telling us about, probably because you don’t know. So a 20K LDR and a 20K resistor will work. Can you post a good photo of your wiring.

Try 68k ~ 100k.

Does the value of analogRead agree with the voltage on the pin as measured with a multimeter?

Have you measured the LDR resistance under various lighting conditions using a multimeter?