safety project slave

Dependencies:   mbed

main.cpp

Committer:
Asimtaj
Date:
2017-11-21
Revision:
0:3da7ec42bd73

File content as of revision 0:3da7ec42bd73:

#include "mbed.h"
Serial pc(USBTX, USBRX);
Serial uart(p28, p27);
int main() {
    while(1) {
        //wait(2);
        if(uart.readable()) {
            char message[125];
            uart.scanf("%s",message);
            //message[strlen(message)] = '\n';
            pc.printf("%s\n\r", message);
        }
    }
}