![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Manual tests for servomotors
Dependencies: mbed Servomotor
main.cpp
- Committer:
- dupm2216
- Date:
- 2017-02-26
- Revision:
- 2:576923533ab1
- Parent:
- 1:6e4e8b9d6069
File content as of revision 2:576923533ab1:
#include "RealPwmOut.hpp" #include "Servomotor.hpp" int main() { RealPwmOut pwm_out(p21);; Servomotor target(pwm_out); printf("Test: The servo should go from 0 to 90 degrees, and back to 0\r\n"); while(true) { target.set_position_down(); wait_ms(500); target.set_position_up(); wait_ms(500); } }