public static void Main() { Servo_API.Servo servo = new Servo_API.Servo(GlobalPins.NECK_PIN); while (true) { for (int i = 0; i <= 180; i++) { servo.Degree = i; Thread.Sleep(10); } for (int i = 180; i >= 0; i--) { servo.Degree = i; Thread.Sleep(10); } } }
public NeckController(Cpu.Pin controlPort) { NeckServo = new Servo_API.Servo(controlPort); }