www.nexusrobot.com Robot Kits manual
113
MotorWheel wheel3(9,8,16,17,&irq3);
irqISR(irq4,isr4);
MotorWheel wheel4(10,7,18,19,&irq4);
Omni4WD Omni(&wheel1,&wheel2,&wheel3,&wheel4);
// 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
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
Omni.PIDEnable(0.31,0.01,0,10); // Enable PID
}
void loop() {
Omni.demoActions(200,5000,500,false);
//Call the demoActions from the Class Omni4WD
//speedMMPS=200
duration=5000
//uptime
=500
debug=false
/*
Omni.setCarLeft(0);
Omni.setCarSpeedMMPS(200,500);
Omni.delayMS(5000);
Omni.setCarSlow2Stop(500);
Omni.setCarRight(0);
Omni.setCarSpeedMMPS(200,500);
Omni.delayMS(5000);
Omni.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...