PWM output

Support for creating custom user applications on the VESC.
slapshot136
Posts: 27
Joined: 15 Sep 2016, 18:24

PWM output

Postby slapshot136 » 06 May 2017, 14:48

I am looking to use the servo connection on the VESC to control a servo (i.e. send a signal out), however, I have two questions:

1. Which pin should I use for sending the signal, as from looking through the code I saw servo[0] and servo[1] and am not sure which one connects to the servo header (preferably what line of C++ do I need to turn it high/low)

2. What sort of timer is available that wouldn't interfere with the motor controls logic too much (I have tried using sleep mili, but milliseconds aren't accurate enough to use for servo controls, and I am afraid of using a micro or nano sleep as I don't think that would give enough time for the context switches to control the motors effectively)

hexakopter
Posts: 86
Joined: 24 Dec 2015, 15:24
Location: Germany

Re: PWM output

Postby hexakopter » 06 May 2017, 22:32

Maybe that thread is interesting for you: http://vedder.se/forums/viewtopic.php?f=6&t=696

When I get it right the port with the 2.54mm header is used for the Servo output. But I am not sure and haven't tested anything regarding Servo output.


Return to “Custom Applications”

Who is online

Users browsing this forum: Bing [Bot] and 1 guest