elektro hiof / Mbed 2 deprecated Oppgave4-1

Dependencies:   mbed

Fork of HelloWorld by Simon Ford

main.cpp

Committer:
tors
Date:
2014-10-17
Revision:
2:eaad066291b6
Parent:
0:fb6bbc10ffa0

File content as of revision 2:eaad066291b6:

#include "mbed.h"  
DigitalOut LR(p18); 
DigitalIn  B1(p20);  
int main() {     
LR = 0;  
    while (1) {         
    while (B1 != 1) /* empty loop */;         
    wait(0.2);         
    LR = 1;         /* Når lampa er på */;        
    wait(0.2);         
    LR = 0;     
    } 
    }