DEUXIEME PROG

Dependencies:   Servo mbed

Committer:
meddahihadj
Date:
Wed Feb 11 10:52:06 2015 +0000
Revision:
0:a1c8577f66c5
Child:
1:32ebac4d3716
aaaaaaa

Who changed what in which revision?

UserRevisionLine numberNew contents of line
meddahihadj 0:a1c8577f66c5 1 #include "mbed.h"
meddahihadj 0:a1c8577f66c5 2 #include "Servo.h"
meddahihadj 0:a1c8577f66c5 3
meddahihadj 0:a1c8577f66c5 4 DigitalOut myled(LED1);
meddahihadj 0:a1c8577f66c5 5
meddahihadj 0:a1c8577f66c5 6 int main (){
meddahihadj 0:a1c8577f66c5 7 Serial pc(USBTX,USBRX);
meddahihadj 0:a1c8577f66c5 8 //: int main(){
meddahihadj 0:a1c8577f66c5 9
meddahihadj 0:a1c8577f66c5 10 while(1){
meddahihadj 0:a1c8577f66c5 11 Serial pc(USBTX, USBRX); // tx, rx
meddahihadj 0:a1c8577f66c5 12 //Serial pc(USBTX, USBRX);
meddahihadj 0:a1c8577f66c5 13 //int main() {
meddahihadj 0:a1c8577f66c5 14 pc.printf("Hello World!\n");
meddahihadj 0:a1c8577f66c5 15 while(1) {
meddahihadj 0:a1c8577f66c5 16 pc.putc(pc.getc() + 1);
meddahihadj 0:a1c8577f66c5 17 }
meddahihadj 0:a1c8577f66c5 18 myled=1;
meddahihadj 0:a1c8577f66c5 19 wait(0.5);
meddahihadj 0:a1c8577f66c5 20 myled=0;
meddahihadj 0:a1c8577f66c5 21 wait(1);
meddahihadj 0:a1c8577f66c5 22 //Servo::write(0.2)
meddahihadj 0:a1c8577f66c5 23 }
meddahihadj 0:a1c8577f66c5 24 }
meddahihadj 0:a1c8577f66c5 25