Created
November 4, 2020 07:45
-
-
Save NoahBres/b6a7d08b4f390c2902b0ac27261db36f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MotorConfigurationType motorConfigurationType = myMotor.getMotorType().clone(); | |
motorConfigurationType.setAchieveableMaxRPMFraction(1.0); | |
myMotor.setMotorType(motorConfigurationType); | |
myMotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER); | |
// Call motor.setPower() like normal | |
// Velo PID is automagically set up for you | |
// and runs in the background | |
// Set velocity to 75% of max RPM | |
myMotor.setPower(0.75) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment