Manual
www.nexusrobot.com Robot Kits manual 
  37
¾  Class Motor Reference 
This section gives a full listing of the capabilities of a Motor. 
Class Motor : public PID 
Interface for visit of peripherals . Inherit from the Public PID. 
¾  Public functions 
Motor(unsigned char _pinPWM,unsigned char _pinDir, 
 unsigned char _pinIRQ,unsigned char _pinIRQB, 
 struct ISRVars* _isr) 
Construct a new Motor instance.   
In your sketch. This will create a Motor object called Motor. You can then use any of its methods; for 
instance, to control a motor attached to pins, you could write 
Parameters: 
unsigned char _pinPWM 
The motor PWM control pin 
unsigned char _pinDir   
 The motor direction control pin 
unsigned char _pinIRQ 
 The interrupt pin A 
unsigned char _pinIRQB 
 The interrupt pin B 
struct ISRVars* _isr 
 The Structure IRSVars’s member 
See:    irqISR(y,x) 
void setupInterrupt() 
  Setup a attach interrupt 
unsigned char getPinPWM() const 
Get the motor’s PWM control pin number 
Return:   PWM control pin 
unsigned char getPinDir() const 
      Get the motor’s direction control pin number 










