hello everyone! I just really need help for my arduino project.
I am trying to develop an automated roof with raindrop sensor.
PROBLEM: when my sensors detects rains, the DC motor that I am using is keep rotating.
OBJECTIVE: All I want is when my raindrop sensor detect rains, the DC motor will rotate clockwise for (10 secs) and then stop. Then when raindrop sensor is dry, the DC motor will rotate counter-clockwiser for (10 secs) and then stop.
if you want to control it with an arduino, its not too hard & there are lots of circuits out there for you to copy / modify. Generally speaking, you'll need a h-bridge (for bidirectional ) + some mofest.
if he adds limit switches (which I agree, he should), I see no reason he should be futzing with millis(), pwm or any timing functions for that matter. but they are basic is good topics to familiarize yourself with.
to the op: can you describe (or show a pic) of this automated roof? I'm curious, but it also might help us help you.
Please do not duplicate your questions as doing so wastes the time and effort of the volunteers trying to help you as they are then answering the same thing in different places.
Repeated duplicate posting could result in a temporary or permanent ban from the forum.
Could you take a few moments to Learn How To Use The Forum
It will help you get the best out of the forum in the future.
Your OS and version can be valuable information, please include it along with extra security you are using.
Always list the version of the IDE you are using and the board version if applicable.
Use quote or add error messages as an attachment NOT a picture.