Loading

MakerBot Print is our newest print-prepration software, which supports native CAD files and STL assemblies,
allows you to interact with all your printers via the Cloud, and many other exciting new features.

Download Now

Report as inappropriate

Hi,

there's a few values you can play around to make avgLDR behave differently. In line #179 there's this:

readOut = map(analogRead(pinLDR), 0, 1023, 220, 0);

0 - 1023 is the "raw" value of your LDR. This is then mapped to 220 - 0. Try to vary the ranges a bit, for example:

readOut = map(analogRead(pinLDR), 0, 1023, 220, 60);

This might shift avgLDR to more usable values. Another way might be decreasing the 0-1023 range. Basic principle is:

Current brightness (160/190/240 are defaults) - avgLDR = brightness to use. So if your lowest value at daylight is already around 80 you'll only get 160 brigthness on max level (240 - 80 = 160).

Edit: Don't have one of the clocks with an LDR at hand right now, so I can't really test this for some values.