
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
Summary of Contents for Nexus Robot
Page 74: ...www nexusrobot com Robot Kits manual 70 Sample Wiring Diagram for RB004 2WD V2 0...
Page 92: ...www nexusrobot com Robot Kits manual 88 Diagram for Omni3WD_V1 0...
Page 96: ...www nexusrobot com Robot Kits manual 92 Diagram_Omni3WD_V3 3...
Page 118: ...www nexusrobot com Robot Kits manual 114 Sample Wiring Diagram for RB011 Mecanum 4WD V4 1...