This is the latest (main) BeagleBoard documentation. If you are looking for stable releases, use the drop-down menu on the bottom-left and select the desired version.

Function rc_servo_send_pulse_us

Function Documentation

int rc_servo_send_pulse_us(int ch, int us)

Sends a single pulse of desired width in microseconds to one or all channels.

This function returns right away and the PRU manages the accurate timing of the pulse in the background. Therefore calling this function succesively for each channel will start the pulse for each channel at approximately the same time.

As described above, servos and ESCs require regular pulses of at least 5hz to function. Since these pulses do not have to be accurate in frequency, the user can use these functions to start pulses from a userspace program at convenient locations in their program, such as immediately when new positions are calculated from sensor values.

Parameters
  • ch[in] Channel to send signal to (1-8) or 0 to send to all channels.

  • us[in] Pulse Width in microseconds

Returns

0 on success, -1 on failure