Skip to content

Instantly share code, notes, and snippets.

@donghee
Created August 23, 2012 04:51
Show Gist options
  • Save donghee/3432572 to your computer and use it in GitHub Desktop.
Save donghee/3432572 to your computer and use it in GitHub Desktop.
for blink
#include "mbed.h"
DigitalOut led1(LED1);
DigitalOut led2(LED2);
int main() {
int i = 0;
while(1) {
for( i = 0 ; i < 4 ; i++ ) {
led1 = !led1;
wait(0.5);
}
for( i = 0 ; i < 4 ; i++ ) {
led2 = !led2;
wait(0.5);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment