Manual
www.nexusrobot.com Robot Kits manual
45
Return: gearedSpeedRPM
See: Motor::setSpeedRPM ()
unsigned int getRatio() const
Get the ratio the car run at
Return: _ ratio
unsigned int setRatio(unsigned int ratio=REDUCTION_RATIO)
Set the Ratio the car run at
This will lie within the range specified at Motor::getRatio()
parameters
unsigned int ratio
The value want to set
See: Motor::getRatio()
¾ Private Parameters
unsigned int _ratio
To save a value
¾ Class MotorWheel
Interface for visit of peripherals and it’s Inherit from the Public Motor.
¾ Public functions
MotorWheel(unsigned char _pinPWM,unsigned char _pinDir,
unsigned char _pinIRQ,unsigned char _pinIRQB,
struct ISRVars* _isr,
unsigned int ratio=REDUCTION_RATIO,unsigned int cirMM=CIRMM)
Construct a new MotorWheel instance.
in your sketch. This will create a MotorWheel object called MotorWheel. You can then use any of its
methods; for instance, to control a MotorWheel attached to pins, you could write
parameters
Unsigned char _pinPWM
The PWM control pin
unsigned char _pinDir
The direction control pin