Skip to content

Commit

Permalink
Continuously rotates servo when you stop pressing button.
Browse files Browse the repository at this point in the history
  • Loading branch information
abirarun committed Oct 20, 2024
1 parent fcce852 commit b684a79
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -318,9 +318,15 @@ public void crservo(double deltaAngle){
if (gamepad1.dpad_right){
con_servo.setPower(-1);
}
if (gamepad1.atRest()){
con_servo.setPower(0);
// if (gamepad1.atRest()){
// con_servo.setPower(0);
// }
if (gamepad1.a){
con_servo.setPower(1);
}
if(gamepad1.b){
con_servo.setPower(0);
}
}
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Expand Down

0 comments on commit b684a79

Please sign in to comment.