1

Dependencies:   mbed

main.cpp

Committer:
davey
Date:
2017-09-23
Revision:
0:feea392aa7c0

File content as of revision 0:feea392aa7c0:

/**************************************************************
/ Simple program program to show basic program structure
/
/ The program flashes onboard LED #1 on/off at a rate of 2Hz
/
/**************************************************************/
#include "mbed.h"

DigitalOut myled(LED1);     // use onboard LED #1

int main() {
 
 while(1) {     // repeat indefinitely
     myled = 1;     // turn on LED #1
    wait(0.250);    // wait 250ms
    myled = 0;      // turn off LED #1
    wait(0.250);    // wait 250ms
 }
}