Arduino 在ardupilot中写入伺服pwm

Arduino 在ardupilot中写入伺服pwm,arduino,pwm,Arduino,Pwm,我在aux pin0pixhawk硬件中为写入PWM编写了这段代码,但是我用示波器看不到这个引脚中的PWM信号 #ifdef USERHOOK_SUPERSLOWLOOP uint16_t pwm = 2000; void userhook_SuperSlowLoop() { uint8_t _channel=9; pwm = 3000 - pwm; hal.rcout->enable_ch(_channel-1); hal.rcout->write(

我在
aux pin0
pixhawk硬件中为写入PWM编写了这段代码,但是我用示波器看不到这个引脚中的PWM信号

#ifdef USERHOOK_SUPERSLOWLOOP
uint16_t pwm = 2000;
void userhook_SuperSlowLoop()
{
    uint8_t _channel=9;
    pwm = 3000 - pwm;
    hal.rcout->enable_ch(_channel-1);
    hal.rcout->write(_channel-1, pwm);
}
#endif
知道我做错了什么吗

谢谢