2013-05-25 04:24 PM
I want to use a Light Dependent Resistor (LDR) to control a door ( open when it feel light and close it when it's darkness).
Can you help me how can I do this,.Thanks a lot #basic-electronics #getting-start #cross-post2013-05-26 06:25 AM
a fixed resistor in series with the LDR between Vref and gnd. an A/D input connected at the junction.
Erik2013-05-27 02:59 AM
''I want to use a Light Dependent Resistor (LDR) to control a door ( open when it feel light and close it when it's darkness)''
Why do you need a microcontroller (any microcontroller - let alone an STM32) to do that? A sinlge transistor should be sufficient; eg,
http://electronicsclub.info/p_lightalarm.htm
''Can you help me how can I do this'' What ''help'', exactly, do you need? For basic electronics - such as how to use an LDR - tryhttp://electronicsclub.info/study.htm
For 'C' programming - tryhttp://blog.antronics.co.uk/2011/08/08/so-youre-thinking-of-starting-with-c/
For details of the STM32, see its Data Sheet and User Manual - and the many examples provided by ST. You didn't say which particular ''STM32 Discovery Board'' you are using - there are at least four different ''STM32 discovery'' boards!http://www.st.com/stm32f0discovery
http://www.st.com/stm32f3discovery
2013-05-27 06:45 AM
So now you have 2 separate threads running on exactly the same question:
[DEAD LINK /public/STe2ecommunities/mcu/Lists/STM32Discovery/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/STM32Discovery/LDR-Light%20Dependent%20Resistor%20and%20STM32Discovery&FolderCTID=0x01200200770978C69A1141439FE559EB459D75800084C20D8867EAD444A5987D47BE638E0F&TopicsView=https%3a//my.st.com/public/STe2ecommunities/mcu/Lists/STM32Discovery/AllItems.aspx¤tviews=19]https://my.st.com/public/STe2ecommunities/mcu/Lists/STM32Discovery/Flat.aspx?RootFolder=%2fpublic%2fSTe2ecommunities%2fmcu%2fLists%2fSTM32Discovery%2fLDR%2dLight%20Dependent%20Resistor%20and%20STM32Discovery&FolderCTID=0x01200200770978C69A1141439FE559EB459D75800084C20D8867EAD444A5987D47BE638E0F&TopicsView=https%3A%2F%2Fmy%2Est%2Ecom%2Fpublic%2FSTe2ecommunities%2Fmcu%2FLists%2FSTM32Discovery%2FAllItems%2Easpx¤tviews=19 I hope you're going to keep up with both...2013-06-28 08:42 AM
Hello,
The duplicated thread will be removed. It should be better to keep discussion in only one side. -Mayla-To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.