6 Replies Latest reply on Aug 18, 2016 1:16 PM by Intel Corporation

    Please help solve the problem of servo motor

    Jeff_Chen

      My servo motor can not work with success compile,It is my c++ code:

       

      #include <iostream>

      using namespace std;

      #include <servo.h>

       

       

      struct Devices{

       

             upm::Servo *servo;

             void init(){

                  servo = new upm::Servo(5);

             }

       

       

      };

       

       

      Devices devices;

       

       

      int main() {

        for(;;){

        devices.servo->setAngle(0);

        devices.servo->setAngle(90);

        devices.servo->setAngle(180);

        devices.servo->setAngle(0);

        }

       

        return 0;

      }