Fa2018-es200-1112-proj2-rockemsockem
/
project2
Servo code
main.cpp
- Committer:
- lugi_dugi
- Date:
- 2018-10-09
- Revision:
- 0:b00d475569de
File content as of revision 0:b00d475569de:
#include "mbed.h" #include "Servo.h" int main() { Servo myservo1(p21); Servo myservo2(p23); DigitalOut sw1(p20); DigitalOut sw2(p19); while (1) { myservo1.calibrate(0.0009, 90.0); myservo2.calibrate(0.0009, 90.0); while (sw1 = 1) { myservo1.write(0.0); myservo1.write(2.0); } while (sw2 = (1) ) { myservo2.write(0.0); myservo2.write(2.0); } } }