Temp Regelaar
Dependencies: TextLCD mbed DS1307
Revision 7:52b2a0b4d452, committed 2015-01-07
- Comitter:
- R0375604
- Date:
- Wed Jan 07 09:40:29 2015 +0000
- Parent:
- 6:c95e2d561599
- Commit message:
- Eindversie Alles is geprogrammeerd
Changed in this revision
Hoofdprogramma.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r c95e2d561599 -r 52b2a0b4d452 Hoofdprogramma.cpp --- a/Hoofdprogramma.cpp Thu Dec 18 09:29:46 2014 +0000 +++ b/Hoofdprogramma.cpp Wed Jan 07 09:40:29 2015 +0000 @@ -13,8 +13,8 @@ DigitalIn Druk1(p15); // temp1 DigitalIn Druk2(p11); // temp2 DigitalIn Druk3(p14); // temp3 -DigitalIn Down(p13); // up -DigitalIn Up(p12); // down +DigitalIn Down(p13); // down +DigitalIn Up(p12); // up DigitalOut Relais(p29); // pin voor de Relais @@ -59,15 +59,13 @@ lcd.cls(); // LCD Clearen while(1) - { - my1307.gettime( &sec, &min, &hours, &day, &date, &month, &year); - + { float temp1 = 0; float temp2 = 0; float temp3 = 0; //------------- De Tijd op de LCD printen ------------------------------------ //------------- Enkel laten zien wanneer je op drukknop drukt----------------- - while(Up) + while(Down) { my1307.gettime( &sec, &min, &hours, &day, &date, &month, &year); wait(0.5); @@ -84,7 +82,7 @@ lcd.printf("Instel Temp1 = "); lcd.locate(0,1); lcd.printf("%4.1f C ",InstelTemp1); - if(Down) + if(Up) { InstelTemp1 += 0.5; lcd.locate(0,0); @@ -93,7 +91,7 @@ lcd.printf("%4.1f C ",InstelTemp1); wait(0.5); } - else if(Up) + else if(Down) { InstelTemp1 -= 0.5; lcd.locate(0,0); @@ -110,7 +108,7 @@ lcd.printf("Instel Temp2 = "); lcd.locate(0,1); lcd.printf("%4.1f C ",InstelTemp2); - if(Down) + if(Up) { InstelTemp2 += 0.5; lcd.locate(0,0); @@ -119,7 +117,7 @@ lcd.printf("%4.1f C ",InstelTemp2); wait(0.5); } - else if(Up) + else if(Down) { InstelTemp2 -= 0.5; lcd.locate(0,0); @@ -136,7 +134,7 @@ lcd.printf("Instel Temp3 = "); lcd.locate(0,1); lcd.printf("%4.1f C ",InstelTemp3); - if(Down) + if(Up) { InstelTemp3 += 0.5; lcd.locate(0,0); @@ -145,7 +143,7 @@ lcd.printf("%4.1f C ",InstelTemp3); wait(0.5); } - else if(Up) + else if(Down) { InstelTemp3 -= 0.5; lcd.locate(0,0);