Lab 2 RC
Dependencies: Motor Servo mbed
main.cpp
- Committer:
- mattsims12
- Date:
- 2015-10-13
- Revision:
- 0:7af9f9bb814c
- Child:
- 1:55b6172d1930
File content as of revision 0:7af9f9bb814c:
/*Matthew Sims RC Control Moves a servo back in forth in small incriments 10/13/15 */ #include "mbed.h" #include "Motor.h" #include "Servo.h" Servo s(p21); int main() { s.calibrate(.0009,90); while(1) { for(int pos=0; pos<=18; pos++) { s(pos/18.0); getchar(); } for(int pos=18; pos>=0; pos--) { s(pos/18.0); getchar(); } } }