/* * Tripod control command */ /// <summary> /// Default constructor /// </summary> public APod() { // set up Port = new Connector("COM6", 115100); Port.Open(); // head head = new Head(new Servo(14, 1500), new Servo(13, 1500), new Servo(29, 1500), new Servo(12, 1500), new Servo(28, 1500)); // legs LeftFront = new Leg(new Servo(16, 1500), new Servo(17, 1500), new Servo(18, 1500), Leg.LEFT); LeftCenter = new Leg(new Servo(20, 1500), new Servo(21, 1500), new Servo(22, 1500), Leg.LEFT); LeftRear = new Leg(new Servo(24, 1500), new Servo(25, 1500), new Servo(26, 1500), Leg.LEFT); RightFront = new Leg(new Servo(0, 1500), new Servo(1, 1500), new Servo(2, 1500), Leg.RIGHT); RightCenter = new Leg(new Servo(4, 1500), new Servo(5, 1500), new Servo(6, 1500), Leg.RIGHT); RightRear = new Leg(new Servo(8, 1500), new Servo(9, 1500), new Servo(10, 1500), Leg.RIGHT); }
/// <summary> /// Update communication port /// </summary> /// <param name="port"></param> public void SetPort(SerialPort port) { Port = new Connector(port); }