basic function test (led and printf)

Dependencies:   mbed

Fork of mbed_blinky by Mbed

main.cpp

Committer:
Bongjun
Date:
2018-07-18
Revision:
21:927c132ae8ca
Parent:
4:81cea7a352b0

File content as of revision 21:927c132ae8ca:

#include "mbed.h"
// define the Serial object
Serial pc(USBTX, USBRX);
DigitalOut led1(LED1);

int main() {
    pc.baud(115200);
    while (true) {
        led1 = !led1;
        // Print something over the serial connection
        pc.printf("Blink! LED is now %d\r\n", led1.read());
        wait(0.5);
    }
}