Manual
www.nexusrobot.com Robot Kits manual
98
¾ Omni4WD Class Reference
This document describes a car with four Motors. On the Introduction, you will know how to use the
Omni4WD library to control the Motors,then to control the car
#include<MotorWheel.h>
Include the header file MotorWheel.h
This section gives a full listing of the capabilities of Omni4WD
Class Omni4WD
Interface for visit of peripherals
¾ Public functions
Omni4WD::Omni4WD(MotorWheel* wheelUL,MotorWheel* wheelLL,
MotorWheel* wheelLR,MotorWheel* wheelUR):
_wheelUL(wheelUL),_wheelLL(wheelLL),
_wheelLR(wheelLR),_wheelUR(wheelUR) {
setSwitchMotorsStat(MOTORS_FB);
}
Construct a new Omni4WD instance.
in your sketch. This will create a Omni4WD object called Omni4WD. You can then use any of its methods;
for instance, to control a Omni4WD attached to pins, you could write
Parameters:
MotorWheel* wheelUL
A point named wheelUL as the object of MotorWheel
MotorWheel* wheelLL
A point named wheelLL as the object of MotorWheel
MotorWheel* wheelLR
A point named wheelLR as the object of MotorWhee
MotorWheel* wheelUR
A point named wheelUR as the object of MotorWhee
unsigned char switchMotors()
Switch Motors to control
This will lie within the range specified at Omni4WD::getSwitchMotorsStat()