communication for safety project

Dependencies:   mbed

main.cpp

Committer:
Asimtaj
Date:
2017-11-21
Revision:
0:8fcca12e22fe

File content as of revision 0:8fcca12e22fe:

#include "mbed.h"
Serial pc(USBTX, USBRX);
Serial uart(p28, p27);
 
int count = 50;
 
int main() {
    pc.printf("%d",count);
    while (1) {

            char str[125]="";
            sprintf(str, "%d", count);
            if(uart.writeable())
            {
                uart.printf("%s\n",str);
            }
            
    }
}