Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Debug.Print("Program Started");
- GT.Interfaces.PWMOutput servo = this.extender.SetupPWMOutput(GT.Socket.Pin.Seven);//Servo motor 1 defined to PWM pin 7
- servo.Active = true;// seems to just turn the servo 'on'
- GT.Interfaces.PWMOutput servo1 = this.extender.SetupPWMOutput(GT.Socket.Pin.Eight);//Servo motor 1 defined to PWM pin 7
- servo1.Active = true;// seems to just turn the servo 'on'
- GT.Interfaces.PWMOutput servo2 = this.extender.SetupPWMOutput(GT.Socket.Pin.Nine);//Servo motor 1 defined to PWM pin 7
- servo2.Active = true;// seems to just turn the servo 'on'
- while (1 == 1)
- {
- for (UInt32 hightime = 600; hightime <= 2000; hightime += 72) // got this part online - can't figure out what it actually does, somehoe difines the range of the servos from 600 to 2000
- {
- servo.SetPulse(20 * 1000 * 1000, hightime * 1000); // From what I gather the first bit is the pulse speed in miliseconds, and the second the strength of the pulse
- System.Threading.Thread.Sleep(100);
- servo1.SetPulse(20 * 1000 * 1000, hightime * 1000);
- System.Threading.Thread.Sleep(100);
- servo2.SetPulse(20 * 1000 * 1000, hightime * 1000);
- System.Threading.Thread.Sleep(100);
- Debug.Print("High Time= " + hightime.ToString());
Advertisement
Add Comment
Please, Sign In to add comment