TP1

Dependencies:   mbed

main.cpp

Committer:
Maximousse
Date:
2020-10-09
Revision:
6:2f6389d61eee
Parent:
5:2c88cabe21d3
Parent:
4:0512f3bda701
Child:
7:a1c1cb3a5d42

File content as of revision 6:2f6389d61eee:

#include "mbed.h"
#include "m3pi.h"

Serial pc(USBTX, USBRX);
DigitalOut myled(LED1);
m3pi pi;

void sendInfo(){
    char* s = "Hello there";
    for (int i=0; i<strlen(s);i++){
        pc.putc(s[i]);
    }
}


int main() {
    char clavier;
    pc.baud(9600);
    /*wait(0.5);
    pi.forward(0.5);
    wait (0.5);
    pi.left(0.5);
    wait (0.5);
    pi.backward(0.5);
    wait (0.5);
    pi.right(0.5);
    wait (0.5);*/
    pc.putc(clavier);

<<<<<<< working copy
    pi.stop();
=======
     //pi.stop();
>>>>>>> merge rev
    
    while(1) {
<<<<<<< working copy
        sendInfo();
        pc.printf("COUCOU COMMENT CQ VQ ??");
=======
        pc.putc(clavier);
>>>>>>> merge rev
        myled = 1;
        wait(0.2);
        myled = 0;
        wait(0.2);
    }
}