DEUXIEME PROG

Dependencies:   Servo mbed

Committer:
meddahihadj
Date:
Thu Feb 19 13:29:00 2015 +0000
Revision:
1:32ebac4d3716
Parent:
0:a1c8577f66c5
DEUXIEME PROGRAMME

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 1:32ebac4d3716 4 DigitalOut allumLED(LED1);
meddahihadj 0:a1c8577f66c5 5
meddahihadj 1:32ebac4d3716 6 int main ()
meddahihadj 1:32ebac4d3716 7 {
meddahihadj 1:32ebac4d3716 8 Serial pc(USBTX,USBRX);
meddahihadj 0:a1c8577f66c5 9 //: int main(){
meddahihadj 1:32ebac4d3716 10
meddahihadj 1:32ebac4d3716 11 while(1) {
meddahihadj 1:32ebac4d3716 12 Serial pc(USBTX, USBRX); // tx, rx
meddahihadj 1:32ebac4d3716 13 //Serial pc(USBTX, USBRX);
meddahihadj 0:a1c8577f66c5 14 //int main() {
meddahihadj 1:32ebac4d3716 15 pc.printf("hadj test\n");
meddahihadj 1:32ebac4d3716 16 while(1) {
meddahihadj 1:32ebac4d3716 17 pc.putc(pc.getc() + 1);
meddahihadj 1:32ebac4d3716 18 }
meddahihadj 1:32ebac4d3716 19 allumLED=1;
meddahihadj 1:32ebac4d3716 20 wait(0.5);
meddahihadj 1:32ebac4d3716 21 allumLED=0;
meddahihadj 1:32ebac4d3716 22 wait(1);
meddahihadj 1:32ebac4d3716 23 //Servo::write(0.2)
meddahihadj 0:a1c8577f66c5 24 }
meddahihadj 1:32ebac4d3716 25 }