Function steps_for_degrees
Source pub fn steps_for_degrees(degrees: f32, steps_per_revolution: u32) -> i32
Expand description
Converts an angle to a whole number of steps for a given motor.
§Arguments
degrees - the angle to turn; negative turns the other way.
steps_per_revolution - the motor’s steps per full turn, for example 200 for a
1.8-degree motor.
§Returns
The nearest whole number of steps to that angle.