Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Servomotor pos-=10 #1753

Open
Bartje007 opened this issue Jul 19, 2024 · 0 comments
Open

Servomotor pos-=10 #1753

Bartje007 opened this issue Jul 19, 2024 · 0 comments

Comments

@Bartje007
Copy link

#include <Servo.h>
Servo myservo;
int pos=0;

void setup()
{
myservo.attach(10);
}
void loop(){
for(pos=0;pos<180; pos++)
{
myservo.write(pos);
delay(5);
}

for(pos=99; pos>1;pos-=10)
{myservo.write(pos);
delay(100);
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant