cancel
Showing results for 
Search instead for 
Did you mean: 

LDR-Light Dependent Resistor and STM32Discovery

jfaycel
Associate
Posted on June 03, 2013 at 20:11

i want to drive a motor for a control of the door  following the LDR sensor signal 

( open when it feel light and close it when it's darkness)

I have an STM32F100RB. please i need your help urgently 

thanks a lot
3 REPLIES 3
crt2
Associate II
Posted on June 04, 2013 at 11:08

You need help with what?

jfaycel
Associate
Posted on June 04, 2013 at 21:20

i need to know how to program the LDR in STM32

Posted on June 04, 2013 at 21:38

You really need to work on your own Master's project.

You'd presumably want to be using an ADC, and place the LDR (VT9ON1) in a resistor divider, perhaps with an 8.2K to VDDA. You'd then use the ADC to measure a voltage at the junction. The firmware library has ADC examples, you'll need to correlate the voltage to light intensity.
Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..