Newer
Older
await BTSmart_M2_motor.setSpeed(512, Motor.CCW);
while (!(await BTSmart_I2_mini_switch.isClosed())) {
await Utility.sleep(10);
}
await BTSmart_M2_motor.stop();
while(true) {
if (await BTSmart_I4_mini_switch.isClosed()) {
await Utility.sleep(600);
await BTSmart_M1_motor.setSpeed(512, Motor.CW);
await Utility.sleep(500);
await BTSmart_M1_motor.stop();
await BTSmart_M2_motor.setSpeed(512, Motor.CW);
while (!(await BTSmart_I4_mini_switch.isOpen())) {
await Utility.sleep(10);
}
await BTSmart_M1_motor.stop();
await BTSmart_M2_motor.setSpeed(512, Motor.CCW);
while (!(await BTSmart_I2_mini_switch.isClosed())) {
await Utility.sleep(10);
}
await BTSmart_M2_motor.stop();
await BTSmart_M1_motor.setSpeed(512, Motor.CCW);
await Utility.sleep(400);
await BTSmart_M1_motor.stop();