Christopher Wardlaw / Mbed 2 deprecated ME21001_Lab02_Exercise_01

Dependencies:   mbed

main.cpp

Committer:
cwardlaw
Date:
2016-09-22
Revision:
0:dd5538520165

File content as of revision 0:dd5538520165:

/**************************************************************
/ 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
  }
}