RC SERVO FOR KL46Z modificado con slider

Dependencies:   SLCD Servo mbed tsi_sensor

Fork of SERVOCONTROL by MARIO DERRANT

Committer:
mderrant
Date:
Tue Jul 22 18:39:01 2014 +0000
Revision:
2:3604d4f17475
Parent:
1:f718f736947a
Child:
3:5b33be4b1a5a
SERVOCONTROL PAR KL46Z

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mderrant 0:f0854ea82f82 1 #include "mbed.h"
mderrant 0:f0854ea82f82 2 #include "Servo.h"
mderrant 0:f0854ea82f82 3
mderrant 1:f718f736947a 4 Servo s1(PTA13);
mderrant 2:3604d4f17475 5
mderrant 0:f0854ea82f82 6
mderrant 2:3604d4f17475 7 AnalogIn p1(PTB0);
mderrant 2:3604d4f17475 8
mderrant 0:f0854ea82f82 9
mderrant 0:f0854ea82f82 10 int main() {
mderrant 0:f0854ea82f82 11 while(1) {
mderrant 2:3604d4f17475 12
mderrant 2:3604d4f17475 13 /* s1.write(0);
mderrant 2:3604d4f17475 14 wait(1.0);
mderrant 2:3604d4f17475 15 s1.write(1);
mderrant 2:3604d4f17475 16 wait(1.0);
mderrant 2:3604d4f17475 17
mderrant 2:3604d4f17475 18 */
mderrant 2:3604d4f17475 19
mderrant 0:f0854ea82f82 20 s1=p1;
mderrant 2:3604d4f17475 21 printf(" %f \r",p1.read());
mderrant 2:3604d4f17475 22
mderrant 0:f0854ea82f82 23 }
mderrant 0:f0854ea82f82 24 }