LED hello world

Dependencies:   mbed

Fork of HelloWorld by Simon Ford

Committer:
SyahmiShah
Date:
Wed Sep 27 12:35:39 2017 +0000
Revision:
3:333d22bc52e9
Parent:
2:0ba1a3a3363c
slowdown blink rate

Who changed what in which revision?

UserRevisionLine numberNew contents of line
simon 0:fb6bbc10ffa0 1 #include "mbed.h"
simon 0:fb6bbc10ffa0 2
simon 0:fb6bbc10ffa0 3 DigitalOut myled(LED1);
SyahmiShah 2:0ba1a3a3363c 4 DigitalOut myled2(LED2);
simon 0:fb6bbc10ffa0 5
simon 0:fb6bbc10ffa0 6 int main() {
simon 0:fb6bbc10ffa0 7 while(1) {
simon 0:fb6bbc10ffa0 8 myled = 1;
SyahmiShah 2:0ba1a3a3363c 9 myled2 = 0;
SyahmiShah 3:333d22bc52e9 10 wait(0.5);
simon 0:fb6bbc10ffa0 11 myled = 0;
SyahmiShah 2:0ba1a3a3363c 12 myled2 = 1;
SyahmiShah 3:333d22bc52e9 13 wait(0.5);
simon 0:fb6bbc10ffa0 14 }
simon 0:fb6bbc10ffa0 15 }