Servo
Driver for PWM controlled servo motors. More...
Protected Attributes
Type
Name
PwmOut
float
float
float
Public Functions
Type
Name
void
float
void
void
Detailed Description
Servo control class, based on a PwmOut Example:
Protected Attributes Documentation
variable _pwm
variable _range
variable _degrees
variable _p
Public Functions Documentation
function Servo
Create a servo object connected to the specified PwmOut pin
Parameters:
pin PwmOut pin to connect to
function write
Set the servo position, normalised to it's full range
Parameters:
percent A normalised number 0.0-1.0 to represent the full range.
function read
Read the servo motors current position
Parameters:
returns A normalised number 0.0-1.0 representing the full range.
function position
Set the servo position
Parameters:
degrees Servo position in degrees
function calibrate
Allows calibration of the range and angles for a particular servo
Parameters:
range Pulsewidth range from center (1.5ms) to maximum/minimum position in seconds
degrees Angle from centre to maximum/minimum position in degrees
function operator=
Shorthand for the write and read functions
function operator=
function operator float
The documentation for this class was generated from the following file: D:/w/hw-libs/\_libs\_/libraries/Servo.h
Last updated