
www.nexusrobot.com Robot Kits manual
69
MotorWheel wheel2(10,11,6,7,&irq2,REDUCTION_RATIO,int(144*PI));
R2WD _2WD(&wheel1,&wheel2,WHEELSPAN);
// This will create a R2WD object called R2WD. You
// can then use any of its methods; for instance, to
// control a R2WD attached to pins, you could write
void setup() {
//TCCR0B=TCCR0B&0xf8|0x01; // warning!! it will change millis()
TCCR1B=TCCR1B&0xf8|0x01; // Pin9,Pin10 PWM 31250Hz
//TCCR2B=TCCR2B&0xf8|0x01; // Pin3,Pin11 PWM 31250Hz
_2WD.PIDEnable(0.26,0.01,0,10); // Enable PID
}
void loop() {
_2WD.demoActions(100,5000); // Call the demoActions from the
Class R2WD
/*
_2WD.setCarAdvance(0);
_2WD.setCarSpeedMMPS(100,500);
_2WD.delayMS(5000);
_2WD.setCarSlow2Stop(500);
_2WD.setCarBackoff(0);
_2WD.setCarSpeedMMPS(100,500);
_2WD.delayMS(5000);
_2WD.setCarSlow2Stop(500);
*/
}
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...