Skip to content
Snippets Groups Projects
Commit ba83c8b2 authored by Ethan Walters's avatar Ethan Walters
Browse files

Added timeout to arduino to prevent 2 motors fighting against each other

parent 78a409cf
No related branches found
No related tags found
No related merge requests found
......@@ -33,6 +33,8 @@ void loop() {
// Ensure the angle is between 0 and 180
if (angle >= 0 && angle <= 180) {
myservo.write(angle); // Move servo to specified angle
delay(1000);
myservo.detach();
Serial.print("Servo moved to: ");
Serial.println(angle);
} else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment