Created
August 6, 2016 13:58
-
-
Save eufat/5cd29eeff0fb2d6c2026d2ccb727f9bc to your computer and use it in GitHub Desktop.
This file contains hidden or 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
float set_speed(float omega_input){ | |
float omega_read_encoder = read_encoder_speed(); | |
if (omega_input != omega_read_encoder){ | |
if (omega_read_encoder > omega_input) mv++; | |
if (omega_read_encoder < omega_input) mv--; | |
} | |
motor_drive(mv) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment