TR-mbed 1.0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
PWMMotor Class Reference

#include <PWMMotor.h>

Inheritance diagram for PWMMotor:

Public Member Functions

 PWMMotor (PinName pin, int defaultVal=0)
 Constructor for PWMMotor.
 
void set (int motorVal)
 Set PWM Output.
 

Constructor & Destructor Documentation

◆ PWMMotor()

PWMMotor::PWMMotor ( PinName  pin,
int  defaultVal = 0 
)

Constructor for PWMMotor.

Parameters
defaultValsome motors will require a default value to send to the motor to initialize it.

Member Function Documentation

◆ set()

void PWMMotor::set ( int  motorVal)

Set PWM Output.

Parameters
motorValinteger from 0 - 180 which corresponds to a pulse width from 1ms to 2ms

The documentation for this class was generated from the following files: