Skip to content
Snippets Groups Projects
Commit cb59a1be authored by Emad2.Khan@live.uwe.ac.uk's avatar Emad2.Khan@live.uwe.ac.uk
Browse files

Code 5

parent 135bde6f
Branches
No related tags found
No related merge requests found
#include "mbed.h"
DigitalOut led1(LED1);
DigitalOut led2(LED2);
DigitalOut led3(LED3);
void blink_then_led1_on() {
for (int i = 0; i < 5; i++) {
led1 = 1;
led2 = 1;
led3 = 1;
thread_sleep_for(200);
led1 = 0;
led2 = 0;
led3 = 0;
thread_sleep_for(200);
}
led1 = 1;
led2 = 0;
led3 = 0;
}
int main() {
blink_then_led1_on();
while (true) {
thread_sleep_for(1000);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment