sunnystar
Junior Member level 3
- Joined
- Aug 3, 2014
- Messages
- 29
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Activity points
- 175
my 3 questions:
1)what is the unit of Light dependent resistor (LDR)? lux or resistance??
2)somebody have set in c code that if its value exceeds 50 than the buzzer turns on, wot is that 50? it's resistance or light or wot??
the code lines are:
3) dividing by ten bcoz 10 samples were taken, but wot's the reason of dividing by 10.24??
1)what is the unit of Light dependent resistor (LDR)? lux or resistance??
2)somebody have set in c code that if its value exceeds 50 than the buzzer turns on, wot is that 50? it's resistance or light or wot??
the code lines are:
Code:
avg.smoke_level=(sum.smoke_level/10)/10.24;
if(avg.smoke_level<=50 )
{
output_low(PIN_D2);
}
else
{
output_high(PIN_D2);
}
delay_ms(500);
}
Last edited by a moderator: