MARIO DERRANT
/
SERVOCONTROL
RC SERVO FOR KL46Z
Revision 2:3604d4f17475, committed 2014-07-22
- Comitter:
- mderrant
- Date:
- Tue Jul 22 18:39:01 2014 +0000
- Parent:
- 1:f718f736947a
- Commit message:
- SERVOCONTROL PAR KL46Z
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r f718f736947a -r 3604d4f17475 main.cpp --- a/main.cpp Fri Jul 18 18:36:32 2014 +0000 +++ b/main.cpp Tue Jul 22 18:39:01 2014 +0000 @@ -2,15 +2,23 @@ #include "Servo.h" Servo s1(PTA13); -Servo s2(PTD2); + -AnalogIn p1(PTD7); -AnalogIn p2(PTA5); +AnalogIn p1(PTB0); + int main() { while(1) { + + /* s1.write(0); + wait(1.0); + s1.write(1); + wait(1.0); + +*/ + s1=p1; - s2=p2; - wait(0.1); + printf(" %f \r",p1.read()); + } }