Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Fork of Oppgave4-4 by
Diff: main.cpp
- Revision:
- 0:c26cdf21261a
- Child:
- 1:e6e3af75f623
diff -r 000000000000 -r c26cdf21261a main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Fri Oct 17 11:48:37 2014 +0000 @@ -0,0 +1,27 @@ +#include "mbed.h" +DigitalOut LR(p18); +DigitalIn B1(p20); + +int main() +{ + float i; + while(1) { + + while (B1==0) { + + wait(2.0); + LR = 1; + wait(2.0); + LR = 0; + } + while(B1==1) { + if(i>=2.0) { + wait(i); + LR=1; + wait(0.2); + LR=0; + } + + } + } +}