Please help me with this project i want to work on. I am working on automated blind that uses motion sensor to open and close the blind with a wave of hand.
I have attached the code but i want to modify it to detect motion and go to a certain degree and stay on that stage until it gets another input(motion).
Sorry for posting the same thing twice, i didn't mean to annoy people but i really needed help to decided what i want to do.
Anyways so do you suggest me to use touch sensor rather than the motion sensor for the action i want to have on the servo. Do you think thats better because it won't have a lot of distraction.
If so, how can i do that? I have a code for the touch sensor. The servo moves from 0 to 180 when i touch it and when i let go it goes from 180 to 0. But i have to do the other 4 stages i have described for the motion sensor.
JimboZA your post was very helpful, i am very new to arduino but i will got with the second option you gave if hoping i can achieve the 4 stages i want. I probably will need help with the coding so i will post as i go along.
I mean they are basically the same except a touch sensor is where you just touch on it but for pushbutton you have to press the button. But let me try it and will let you know.
The one i have right below is how the website "http://arduino.cc/en/Tutorial/ButtonStateChange " declared but they are using buttonPin and ledPin.I wanted to use touchsensorPin as an input and servoPin as an output. How can i do that?
const int buttonPin = 2; // the pin that the pushbutton is attached to
const int ledPin = 13; // the pin that the LED is attached to
Thanks for that code, but after uploading it to the arduino and connecting the pins, it did not work. I have studied the code and it looks accurate to me, but could you reevaluate it to see why it may not be working? Also, I thought the touch sensor was analog and not digital pin. Could you explain your reason for using digital pins in the code?