Simple wait example

main.cpp

Committer:
sarahmarshy
Date:
2017-06-23
Revision:
1:4f0543415053
Parent:
0:7d249aa3d880

File content as of revision 1:4f0543415053:


 #include "mbed.h"

 DigitalOut heartbeat(LED1);

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