Skip to content

Instantly share code, notes, and snippets.

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