12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
-
-
- #include <unistd.h>
- #include <iostream>
- #include "es08a.h"
- #include <signal.h>
- #include <stdlib.h>
-
- int
- main(int argc, char **argv)
- {
-
- upm::ES08A *servo = new upm::ES08A(5);
-
-
-
-
- servo->setAngle (180);
- std::cout << "Set angle to 180" << std::endl;
- sleep(1);
- servo->setAngle (90);
- std::cout << "Set angle to 90" << std::endl;
- sleep(1);
- servo->setAngle (0);
- std::cout << "Set angle to 0" << std::endl;
- sleep(1);
- servo->setAngle (90);
- std::cout << "Set angle to 90" << std::endl;
- sleep(1);
- servo->setAngle (180);
- std::cout << "Set angle to 180" << std::endl;
-
-
- std::cout << "exiting application" << std::endl;
-
- delete servo;
-
- return 0;
- }
|