what is the unit of the light intensity recorded?

Why do we use a 10k ohm resistor?

The A0 point is the analog point and it takes in the value of voltage between 0 to 1.The taken value say 0.576V is converted to a binary number of 10 bits,by the in built ADC converter.So each value read by A0 pin is given by 10 bit binary number whose decimal equivalent ranges from 0 to 2^10-1(this decimal equiv. is shown in the output table).

Now in our case at bright light LDR,resistance lowers down and it gives less drop so A0 pin gets high value.For dark case resistance increases,and gets good drop so A0 pin gets low value.

we are using this 10k ohm resistor for resisting the current flow so that the LDR works properly and gets perfect current flow not less nor more.

@truptis.me19

rightly mentioned about the A0 pin and its function.

Talking about 10k resistor,the principle used here is VOLTAGE DIVIDER, which means voltage is getting dividerd between the two,i.e LDR and 10k resistor,so that there is no harm to LDR and can work in its operating range(voltage operating range).

Can we use a resistor of any value?

@truptis.me19

imagine a circuit here,with V1,R1 and V2,R2. V1 being voltage across R1 and V2 being voltage across R2, and V is the voltage applied.Here R2 is nothing but the resistance of LDR.

now acc. to voltage divider principle(to find V2=voltage across LDR), V2= V*R2/(R1+R2).

If you know the resistance value R2(LDR data sheet) and your applied voltage and the voltage you expect as output(in a certain range) ,you can calculate R1(for that voltage range).

R1 should not be out of this range,if so you may not get the output.

Using different resistances will give different values.

If the resistance is **too high**, then the voltage across it will be increased and voltage across LDR will be lowered, **decreasing its light sensitivity** as less voltage will be detected by A0 pin. There might be a condition when output would be 0 for a range of brightness.

Conversely, if the resistance is **too low**, the **light sensitivity will be increased**. There are chances when output would be 255 (full) for a range of brightness, which would be useless.

So, I recommend to use resistances between 8k ohm to 10k ohm.

10k ohm resistace is a voltage divider circuit which is to protect the LDR .We can use any resistance which do not harm the LDR

Well explained !!

I need to add one more point. The main reason for connecting one pin of LDR to A0 pin is the outcome from LDR is analog voltage and A0 pin which inbuilt have ADC ( so converts the analog voltage to digital voltage).

The output that we are seeing is the Digital representation of voltage value.

please correct me if my understanding is wrong

The unit of the light intensity recorded in lux.

the reason we use a 10k ohm resistor because to make sure there is constant and uniform flow of current and voltage to the LDR so that its does not get damaged or read wrong values in the result.

10k ohm resistor is used to protect the LDR and called voltage divider circuit .10k ohm resistor is make a constant and uniform flow of current & voltage to the LDR to protect them from damage.