Lab1-01_pc_communication_character_lite

Dependencies:   mbed

main.cpp

Committer:
heptasat2021
Date:
2021-08-10
Revision:
0:da0f6aca15b8

File content as of revision 0:da0f6aca15b8:

#include "mbed.h"
Serial pc(USBTX,USBRX,9600);
int main()
{
    char a,b;
    a = 'A';
    pc.putc(a);
    for(int i=0;i<10;i++) {
        pc.printf("\r\n i=%d -- press any key -->",i);
        b = pc.getc();
        pc.putc(b);
        wait_ms(500);
    }
    pc.printf("\r\n End of program\r\n");
}