test

Dependencies:   mbed-os mbed

main.cpp

Committer:
symo0921
Date:
2018-10-02
Revision:
1:3dc76cd598b0
Parent:
0:2d562b246a88
Child:
2:e91969c6ae09

File content as of revision 1:3dc76cd598b0:

#include "mbed.h"
 
DigitalOut led1(LED1);
DigitalOut led2(LED2);

 
void led2_thread() {
    while (true) {
        led2 = !led2;
        wait(1);
    }
}
 
int main() {
    thread.start(led2_thread);
    
    while (true) {
        led1 = !led1;
        wait(0.5);
    }
}