1

Topic: Servo delay

Hey. I have to say that I am really happy with Remotexy. but I have a little problem. i want a servo to move from position a to position b at the touch of a button, but it's a bit difficult when i can use delay. any good ideas. thanks in advance.

2 (edited by Gunner 2021-07-25 08:49:59)

Re: Servo delay

martin-block wrote:

but it's a bit difficult when i can use delay

Not clearly understanding this... what code have you tried?

A simple press of button to move servo would be something like this...

void loop()
{
  if(RemoteXY.button_1==1){
    myservo.write(180);  // When button pressed
  }
  else
    myservo.write(0);  // When button released
}
"And voila, which is French for.......'and then I found out.'"