RC SERVO FOR KL46Z modificado con slider
Dependencies: SLCD Servo mbed tsi_sensor
Fork of SERVOCONTROL by
main.cpp@0:f0854ea82f82, 2014-07-18 (annotated)
- Committer:
- mderrant
- Date:
- Fri Jul 18 18:19:57 2014 +0000
- Revision:
- 0:f0854ea82f82
- Child:
- 1:f718f736947a
RC SERVO PARA KL46Z
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mderrant | 0:f0854ea82f82 | 1 | #include "mbed.h" |
mderrant | 0:f0854ea82f82 | 2 | #include "Servo.h" |
mderrant | 0:f0854ea82f82 | 3 | |
mderrant | 0:f0854ea82f82 | 4 | Servo s1(PTA1); |
mderrant | 0:f0854ea82f82 | 5 | Servo s2(PTA2); |
mderrant | 0:f0854ea82f82 | 6 | |
mderrant | 0:f0854ea82f82 | 7 | AnalogIn p1(PTD3); |
mderrant | 0:f0854ea82f82 | 8 | AnalogIn p2(PTA12); |
mderrant | 0:f0854ea82f82 | 9 | |
mderrant | 0:f0854ea82f82 | 10 | int main() { |
mderrant | 0:f0854ea82f82 | 11 | while(1) { |
mderrant | 0:f0854ea82f82 | 12 | s1=p1; |
mderrant | 0:f0854ea82f82 | 13 | s2=p2; |
mderrant | 0:f0854ea82f82 | 14 | wait(0.1); |
mderrant | 0:f0854ea82f82 | 15 | } |
mderrant | 0:f0854ea82f82 | 16 | } |