How do I adjust the scale/calibration of a photoresistor?
You can easily scale in Arduino code with the map() function.

e.g.:

const int MIN_LIGHT 100;
const int MAX_LIGHT 700;

int light_reading = analogRead(A0);

// Convert MIN reading (100) -&gt; MAX reading (700) to a range 0-&gt;100.
int percentage_bright = map(light_reading, MIN_LIGHT, MAX_LIGHT, 0, 100);


But you may need some calibration of your system to handle different ambient light situations. What reading do you get in direct sunlight for example?

So then I assume you're using PWM (Pulse Width Modulation) to drive the LED.  This requires a value between 0 &amp; 255.  Once again we can use the map() function.

// Convert light-value % (0-100) to PWM speed (0-255)
int led_brightness = map(percentage_bright, 0, 100, 0, 255);
analogWrite(LED_PIN_RED, led_brightness);


Obviously these bits of code can be reduced down to a single line - mapping directly from the reading to the desired result.