Servo stared with switch bottom and stop automaticaly 3 minutes latter.

Servo stared with switch bottom and stop automaticaly 3 minutes latter.

Not sure the hardware configuration. I have it working as long the bottom is press.

Not sure of the programing.

Thanks

trenes55:
Not sure the hardware configuration.

Since you haven’t provided it, neither is anyone else sure.

trenes55:
Not sure of the programing.

Neither is anyone else since there’s nothing enclosed in </> quote tags for anyone to look at.

trenes55:
Servo stared with switch bottom and stop automaticaly 3 minutes latter.

??

Starting something upon button press and running it for three minutes is of course dead easy:

loop() {
  if (digitalRead(BUTTONPIN, LOW)) {
    startServo();
    delay(3 * 60 * 1000);
    stopServo();
  }
}

That'll do the job. Just fill in the proper functions to start and stop the servo, define the pin connection, set the pinMode()s and so, and you're in business. Now while this solution does the job, it's also plain ugly as it blocks the processor from doing anything else while it sits out the 3-minute delay().

For wiring, ask our good friend Mr Google. You'll easily find wiring diagrams for buttons, servos, and just about anything else.

Hi,
Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?
Include how you have your button wired and your servo.

We cannot do anything for you without the above.
Also a link to the data/spec of your servo.
What is it supposed to do for 3 minutes?

Thanks.. Tom.. :slight_smile: