6 Replies Latest reply on Feb 6, 2014 2:25 PM by Mikal.Hart

    Servo's won't work for me!

    Thomas.Carrigan

      This is the code I'm using from the Arduino website but It won't run, is this a Galileo Specific problem or am I doing something wrong?

       

      #include <Servo.h>

       

      Servo myservo;

                   

       

      int pos = 0; 

       

      void setup()

      {

        myservo.attach(9);

      }

       

       

      void loop()

      {

        for(pos = 0; pos < 180; pos += 1)

        {                             

          myservo.write(pos);         

          delay(15);                    

        for(pos = 180; pos>=1; pos-=1)  

        {                             

          myservo.write(pos);        

          delay(15);                  

        }

      }