File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 2
2
#define SCREEN_HEIGHT 64 // OLED display height, in pixels
3
3
4
4
#define PASSWORD "waaatering"
5
+
6
+ int CO2_WARN_PPM = 1200 ;
Original file line number Diff line number Diff line change @@ -472,8 +472,11 @@ void loop()
472
472
appState = 1 ;
473
473
474
474
display.clearDisplay ();
475
+ display.setTextSize (1 );
476
+
475
477
display.setCursor (0 , 0 );
476
478
display.print (" preheating..." );
479
+
477
480
display.display ();
478
481
}
479
482
}
@@ -493,15 +496,23 @@ void loop()
493
496
Serial.println (lastCo2Value);
494
497
495
498
display.clearDisplay ();
499
+ display.setTextSize (1 );
496
500
501
+ display.setCursor (0 , 0 );
497
502
display.print (" temp: " );
498
503
display.print (lastTemperature);
499
504
500
- display.setCursor (10 , 0 );
501
-
505
+ display.setCursor (0 , 10 );
502
506
display.print (" co2: " );
503
507
display.print (lastCo2Value);
504
508
509
+ if (lastCo2Value >= CO2_WARN_PPM)
510
+ {
511
+ display.setCursor (0 , 40 );
512
+ display.setTextSize (2 );
513
+ display.print (" L Ü F T E N" );
514
+ }
515
+
505
516
display.display ();
506
517
507
518
lastCo2Measurement = millis ();
You can’t perform that action at this time.
0 commit comments