Added various bits, main reformatted. Added .get to class Servo to allow waiting for rotation before recording information.
Fork of Lab6_Basic by
main.cpp
- Committer:
- ziadeldebri
- Date:
- 2016-09-19
- Revision:
- 3:b787aa49b900
- Parent:
- 0:61b18b631f94
- Child:
- 4:b3a93554fedf
File content as of revision 3:b787aa49b900:
#include "mbed.h" #include "Motor.h" #include "Servo.h" /************************************* Lab5 Motor to servo ***************************/ /* */ /* File: main.cpp */ /* Author: Ziad Eldebri */ /* Date Created: 8/19/2016 */ /* Description: */ /* */ /****************************************************************************************/ Servo my_servo(PTB3,PTE19,PTE18,PTE31); int main() { while (1) { my_servo.set(45); wait(4); my_servo.set(65); wait(4); my_servo.set(90); wait(4); my_servo.set(135); wait(4); my_servo.set(180); wait(4); } }