How to use wait

main.cpp

Committer:
mab5449
Date:
2017-01-19
Revision:
0:7780c906c1c7

File content as of revision 0:7780c906c1c7:

#include "mbed.h"

DigitalOut heartbeat(LED1);

int main() {
    while (1) {
        heartbeat = 1;
        wait(0.5);
        heartbeat = 0;
        wait(0.5);
    }
}