Assignement_2_c

Dependencies:   MODSERIAL mbed

Fork of Minor_test_serial by First Last

main.cpp

Committer:
Fianna
Date:
2018-09-11
Revision:
3:d826445e3ce3
Parent:
2:161481e810dc

File content as of revision 3:d826445e3ce3:

#include "mbed.h"
#include "MODSERIAL.h"

DigitalOut myled(LED_GREEN);
MODSERIAL pc(USBTX, USBRX);

int main()
{
    pc.baud(115200);
    
    
    char c;
    c = pc.getc();
    
    pc.printf("input user: %c\r\n", c);
    
    while (true) {
        myled = !myled;
        wait(0.3f);
        
    }
}