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
main.cpp
- Committer:
- Hammer4400
- Date:
- 2017-05-07
- Revision:
- 0:f0609ea1bd97
- Child:
- 1:0b2a1b4bf3a3
File content as of revision 0:f0609ea1bd97:
#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; }