(I like WEND!)
Looks like you got it!!!
Now change the select case to use the ten bit values. 0 to 1023.
And for you project you may want to play with some averaging. Analog will tend to drift with a temperature flux (resistors) or more so for your application how sensitive you want the LDR (stray car lights?).
Bookmarks