Lee Nam Cheol / Mbed OS lab06-mutex-yes

main.cpp

Committer:
namcheol
Date:
2020-04-27
Revision:
2:20e20cfae75e
Parent:
1:89d23c8072af
Child:
3:1c8ab6d6af18

File content as of revision 2:20e20cfae75e:

#include "mbed.h"

Serial uart_tx(D1, D0);   //D1 = tx, D0 = rx
DigitalIn sw(D2, PullDown);

int main()
{
    while(true) {
        if(sw == 1) {
            uart_tx.putc('1');
            thread_sleep_for(200);
        }
    }
}