This is a very simple guide, reviewing the steps required to get Blinky working on an Mbed OS platform.

Dependencies:   RemoteIR

main.cpp

Committer:
sb8718
Date:
2020-04-13
Revision:
113:be6b329fe2d5
Parent:
112:5a7629ace1c4
Child:
114:376a5998ecf4

File content as of revision 113:be6b329fe2d5:

#include "mbed.h"

RawSerial pc(PA_2, PA_3, 115200); // USART2

int main() {

    pc.printf("\r\n Welcome to UART Lab_2_1!\r\n");
    pc.printf("Enter characters..\r\n");
    
    while(true) {
        
        int ch = pc.getc();
        pc.putc(ch);
        if(ch == 0x0D) {
         
            while(!pc.writeable());
            pc.putc(0x0A);
        }
    }
}