I have setup the Photoresistor project and have been pulling my hair out all day. It seems no matter what I have plugged into the analog pins, I get random values ranging from around 800 - 1400. Doesn’t matter if I have nothing plugged in, the reading changes randomly. If I use a resistor or photoresistor it makes absolutely no difference.
If you leave the analog inputs undriven, you will get random values. If you connect the inputs to a voltage, like a resistor divider using a photo resistor and another resistor, you should get values that are consistent within a few percent.
There was a piece of cardstock with pinouts that told me where to put everything. I have the resistor connected from ground to A0, and the photoresistor connected from A0 to A5. Reading pin A5.
Reading 4095 is good! Do you have the other fixed resistor (borrow it from the LED side) that you can replace the photo resistor with? That should make the reading go to 2047.
Try removing this line--there have been some problems with this interfering with the setting used for analogRead (which is not INPUT). The line as your have it configures A0 as a digital input.