Test

Dependencies:   RTC mbed

recievelink.cpp

Committer:
twitte
Date:
2016-05-27
Revision:
2:c86901b0b8ae

File content as of revision 2:c86901b0b8ae:

#include "mbed.h"

Serial micro(p9, p10);
Serial pc(USBTX,USBRX);
int command;
int check;


int main()
{
    micro.format(8, Serial::None, 1);
    micro.baud(19200);
    pc.format(8, Serial::None, 1);
    pc.baud(9600);


    command = micro.getc();
    
    pc.printf("This is the character entered by the other pc: %X\n",command);
    
    pc.printf("enter code");

    check = pc.getc();
    pc.printf("code entered = %X\n",check);
    micro.putc(check);
    

}