Lab 2

Dependencies:   mbed

main.cpp

Committer:
pdstewart
Date:
2016-09-24
Revision:
0:bc9f80ce1629

File content as of revision 0:bc9f80ce1629:

#include "mbed.h"

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

int main() {
    while(1) {          // repeat indefinitely     
        myled = 1;      // turn on LEd # 1          
        wait(1);        // wait 1s 
        myled = 0;      // turn off LED # 1 
        wait(1);        // wait 1s
        myled = 1;      // turn on LEd # 1          
        wait(1);        // wait 1s 
        myled = 0;      // turn off LED # 1 
        wait(1);        // wait 1s
        myled = 1;      // turn on LEd # 1          
        wait(1);        // wait 1s 
        myled = 0;      // turn off LED # 1 
        wait(1);        // wait 1s
        myled = 1;      // turn on LEd # 1          
        wait(1);        // wait 1s 
        myled = 0;      // turn off LED # 1 
        wait(1);        // wait 1s
        myled = 1;      // turn on LEd # 1          
        wait(1);        // wait 1s 
        myled = 0;      // turn off LED # 1 
        wait(5);        // wait 5s 
    }
    
}