Quantcast
Channel: ArduPilot Discourse - Latest topics
Viewing all articles
Browse latest Browse all 45661

Writing Servo pwm

$
0
0

@hamid_didari wrote:

hi guys
I wrote this code for write pwm in aux pin0 but I couldn't see pwm signal in this pin with oscope.

#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

any idea what i do wrong?
tanks

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 45661

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>