36 lines
1.1 KiB
C#
36 lines
1.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using ebbits.Arduino;
|
|
|
|
namespace ebbits.Robots {
|
|
class LaserBot : AbstractRobot {
|
|
private Arduino.MainArduino Arduino;
|
|
public LaserBot(int id, MainArduino a) {
|
|
init(id);
|
|
base.cservos = 4;
|
|
this.Arduino = a;
|
|
base.name = "Laser";
|
|
}
|
|
|
|
override public void run() {
|
|
base.startPowerMess();
|
|
|
|
base.setStartPosition(new int[] {77, 175, 155, 84 }, 500);
|
|
|
|
base.setPosition(new int[] { 77, 157, 134, 84 }, 400);
|
|
base.setPosition(new int[] { 83, 97, 116, 44 }, 200);
|
|
Arduino.setLaser(MainArduino.ON);
|
|
base.setPosition(new int[] { 102, 90, 108, 42 }, 20);
|
|
base.setPosition(new int[] { 98, 79, 90, 48 }, 20);
|
|
base.setPosition(new int[] { 83, 82, 95, -1 }, 20);
|
|
base.setPosition(new int[] { 83, 97, 116, 44 }, 20);
|
|
Arduino.setLaser(MainArduino.OFF);
|
|
base.setPosition(new int[] { 77, 157, 134, 84 }, 400);
|
|
base.setPosition(new int[] { 77, 175, 155, 84 }, 400);
|
|
|
|
base.shutdownServo();
|
|
}
|
|
}
|
|
}
|