MOでLチカします

Dependencies:   mbed

MO.c

Committer:
osakah
Date:
2016-01-13
Revision:
4:06501f975281
Child:
5:7a3e5c323cda

File content as of revision 4:06501f975281:

#include "mbed.h"

DigitalOut myled(LED1);

int main() {
    while(1) {
        //M
        myled = 1; // LED is ON
        wait(0.3); // 300 ms
        myled = 0; // LED is OFF
        wait(0.1); // 100 ms
        myled = 1; 
        wait(0.3); 
        myled = 0; 
        wait(0.1); 

        wait(0.3); 
        
        //O
        myled = 1; 
        wait(0.3); 
        myled = 0; 
        wait(0.1); 
        myled = 1; 
        wait(0.3); 
        myled = 0; 
        wait(0.1); 
        myled = 1; 
        wait(0.3); 
        myled = 0; 
        wait(0.1); 
        
        wait(0.3);
    }
}