elektro hiof / Mbed 2 deprecated Oppgave4-1

Dependencies:   mbed

Fork of HelloWorld by Simon Ford

Committer:
tors
Date:
Fri Oct 17 11:42:31 2014 +0000
Revision:
2:eaad066291b6
Parent:
0:fb6bbc10ffa0
.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
tors 2:eaad066291b6 1 #include "mbed.h"
tors 2:eaad066291b6 2 DigitalOut LR(p18);
tors 2:eaad066291b6 3 DigitalIn B1(p20);
tors 2:eaad066291b6 4 int main() {
tors 2:eaad066291b6 5 LR = 0;
tors 2:eaad066291b6 6 while (1) {
tors 2:eaad066291b6 7 while (B1 != 1) /* empty loop */;
tors 2:eaad066291b6 8 wait(0.2);
tors 2:eaad066291b6 9 LR = 1; /* Når lampa er på */;
tors 2:eaad066291b6 10 wait(0.2);
tors 2:eaad066291b6 11 LR = 0;
tors 2:eaad066291b6 12 }
tors 2:eaad066291b6 13 }