LDR / Sensor as digital input

LDR / Sensor as digital input.

If i use an LDR as the top part of a Voltage divider, emitting to the base of an NPN Transistor, when resistance drops across the LDR, is this ok? If the LDR resistance is 200Ohm to 10kOhm, and i want transistor to turn on at 10KOhm with 5v power, NPN turns on at 0.8v.

So 10,000 * 0.8 / 5v = 1400kOhm, therefore a 1.5kOhm resistor should suffice. And supply the necessary HIGH signal of a digital input?

I ask as i need the lowest component count, with the least amount of draw on my project, and hopefully help my project wake from its current sleep state.

Why do you think you need a transistor? Why not connect LDR + resistor to digital pin directly? Arduino has threshold 2.7V low to high, build-in Schmidt trigger with hysteresis 0.5V (2.2V high to low) . Varying value of resistor you 'd easily set luminance level point

Thought it had to be 5v ttl, 2.2v that is workable. Now just need to check Attiny Datasheets.

Cheers.

Discussed here http://arduino.cc/forum/index.php/topic,163846.msg1223626.html#msg1223626

My apologies for not remembering.