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
Diff: main.cpp
- Revision:
- 0:f0609ea1bd97
- Child:
- 1:0b2a1b4bf3a3
diff -r 000000000000 -r f0609ea1bd97 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Sun May 07 15:48:42 2017 +0000 @@ -0,0 +1,34 @@ +#include "mbed.h" + +DigitalOut myled(LED1); +DigitalIn up(p5); +DigitalIn down(p6); + + +extern int timespan; +int t; +int i, set_temp; + +int main(){ + while(i<1){ //Åbner set_temp for input. + + if (up==1) {//Modtager input fra bruger + set_temp = (set_temp +1); } //hvis "up" stiger temp 1 + if (down==1) {//Modtager input fra bruger + set_temp = (set_temp -1);} //hvis "down" falder temp 1 + else if (timespan == 500);{ + break;} + } + + /*hvis passiv 5 sek. sættes i=2 og + t=700, og tvinger det forbi hibernation*/ + + i=2 + t=700 + return 0; + } + + + + +