View Single Post
  #6   Spotlight this post!  
Unread 04-02-2017, 21:54
thecoopster20 thecoopster20 is offline
4th Year Programmer - Java
FRC #3602 (Robomos)
Team Role: Programmer
 
Join Date: Mar 2016
Rookie Year: 2014
Location: Escanaba, MI
Posts: 27
thecoopster20 is an unknown quantity at this point
Re: Anyone Have Servo Example Code?

Alright, so today I managed to get the L-16 working perfectly, here are my findings:

-The datasheet for this actuator contains an important piece of information: a PWM pulse width of 2ms fully extends the actuator, and a PWM pulse width of 1ms fully retracts the actuator. The default Max/Min pulse widths for a servo in WPILib is 2.4ms and .6ms, respectively. Be sure to use the setBounds function to ensure that the max and min widths are set for the L-16.

-The basic set function does not seem to work for whatever reason. Using setSpeed(1) and setSpeed(-1) properly calls setMaxPWM and setMinPWM wheres set(1) and set(0) do not properly call them.

-In your commands nothing has to be executed repeatedly. Just call your setSpeed function in the command's init and the actuator takes care of the rest.

Now that the software is working, these are actually fantastic tools. Just wish that there was more documentation for getting these things to work properly.
Reply With Quote