Manual
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); 
   */ 
} 










