Assignement_2_c

Dependencies:   MODSERIAL mbed

Fork of Minor_test_serial by First Last

main.cpp

Committer:
Fianna
Date:
2018-09-11
Revision:
2:161481e810dc
Parent:
1:40470bc517f1
Child:
3:d826445e3ce3

File content as of revision 2:161481e810dc:

#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\n", c);
    
    while (true) {
        myled = !myled;
        wait(0.3f);
        
    }
}