angle_to_ns

angle_to_ns(angle: int) → int[source]

Transforms an angle to the PWM high time of the old HAT servos.

Parameters:

angle (int) – The angle in degrees (0-180).

Returns:

The high time in nanoseconds (500000 - 2500000).

Return type:

int