Skip to main content

pamoja_servo_map_pulse

Function pamoja_servo_map_pulse 

Source
#[unsafe(no_mangle)]
pub extern "C" fn pamoja_servo_map_pulse( servo: PamojaServoMap, angle_deg: f32, ) -> u16
Expand description

Returns the pulse width that sets a servo to an angle.

§Arguments

  • servo - the servo.
  • angle_deg - the angle in degrees, held to the servo’s travel.

§Returns

The pulse width in microseconds, or 0, no pulse, for an angle that is not a number.