ProjectsOld/ebbits/AdvancedServo-simple/Robots/LaserBot.cs
2017-09-26 20:21:42 +02:00

36 lines
1.0 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, 96, 114, 44 }, 200);
Arduino.setLaser(MainArduino.ON);
base.setPosition(new int[] { 101, 91, 107, 45 }, 20);
base.setPosition(new int[] { 98, 78, 88, 49 }, 20);
base.setPosition(new int[] { 83, 82, 95, 46 }, 20);
base.setPosition(new int[] { 83, 96, 114, 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();
}
}
}