RC SERVO FOR KL46Z modificado con slider
Dependencies: SLCD Servo mbed tsi_sensor
Fork of SERVOCONTROL by
Diff: main.cpp
- Revision:
- 2:3604d4f17475
- Parent:
- 1:f718f736947a
- Child:
- 3:5b33be4b1a5a
--- 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()); + } }