Difference between revisions of "ServoCentering"
|  (Created page with "<syntaxhighlight lang="c"> using SecretLabs.NETMF.Hardware; using SecretLabs.NETMF.Hardware.NetduinoPlus;  namespace CenterServos {     public class Program     {         // Adju...") | |||
| Line 1: | Line 1: | ||
| − | <syntaxhighlight lang=" | + | <syntaxhighlight lang="csharp"> | 
| using SecretLabs.NETMF.Hardware; | using SecretLabs.NETMF.Hardware; | ||
| using SecretLabs.NETMF.Hardware.NetduinoPlus; | using SecretLabs.NETMF.Hardware.NetduinoPlus; | ||
Revision as of 11:08, 27 November 2011
using SecretLabs.NETMF.Hardware;
using SecretLabs.NETMF.Hardware.NetduinoPlus;
namespace CenterServos
{
    public class Program
    {
        // Adjust the duration of Turns
        static uint turnDuration;
        static AnalogInput turnDurationPot = new AnalogInput(Pins.GPIO_PIN_A0);
        // adjust the duration of Motions
        static int straightDuration;
        static AnalogInput maintainDurationPot = new AnalogInput(Pins.GPIO_PIN_A1);
        public static void Main()
        {
            PWM leftServo = new PWM(Pins.GPIO_PIN_D5);
            PWM rightServo = new PWM(Pins.GPIO_PIN_D6);
            leftServo.SetPulse(20000, 1500);
            rightServo.SetPulse(20000, 1500);
        }
    }
}

