Lauflicht led 1-4

Dependencies:   mbed

Committer:
SebiStr99
Date:
Thu Mar 05 13:49:54 2015 +0000
Revision:
1:201c99e74ae0
Parent:
0:11c4ec07937f
LED lauflicht hexadecimal

Who changed what in which revision?

UserRevisionLine numberNew contents of line
SebiStr99 0:11c4ec07937f 1 #include "mbed.h"
SebiStr99 0:11c4ec07937f 2
SebiStr99 1:201c99e74ae0 3 BusOut led(LED1, LED2, LED3, LED4);
SebiStr99 0:11c4ec07937f 4
SebiStr99 0:11c4ec07937f 5 int main ()
SebiStr99 0:11c4ec07937f 6 {
SebiStr99 1:201c99e74ae0 7 bool change = 1;
SebiStr99 1:201c99e74ae0 8
SebiStr99 0:11c4ec07937f 9 while (1)
SebiStr99 0:11c4ec07937f 10 {
SebiStr99 1:201c99e74ae0 11 if(change)
SebiStr99 1:201c99e74ae0 12 {
SebiStr99 1:201c99e74ae0 13 led = 0x03;
SebiStr99 1:201c99e74ae0 14 }
SebiStr99 1:201c99e74ae0 15 else
SebiStr99 1:201c99e74ae0 16 {
SebiStr99 1:201c99e74ae0 17 led = 0x0c;
SebiStr99 1:201c99e74ae0 18 }
SebiStr99 0:11c4ec07937f 19
SebiStr99 1:201c99e74ae0 20 change = !change;
SebiStr99 1:201c99e74ae0 21 waitms(500);
SebiStr99 1:201c99e74ae0 22
SebiStr99 0:11c4ec07937f 23 }
SebiStr99 0:11c4ec07937f 24
SebiStr99 0:11c4ec07937f 25
SebiStr99 0:11c4ec07937f 26
SebiStr99 0:11c4ec07937f 27
SebiStr99 0:11c4ec07937f 28 }