Juri Pfammatter / Mbed OS LÜTR

Dependencies:   PM2_Libary Adafruit_GFX BME680

Files at this revision

API Documentation at this revision

Comitter:
pfammjur
Date:
Mon May 10 08:58:06 2021 +0000
Parent:
12:b217d70735ec
Child:
14:ebd47e8c6360
Commit message:
(finished) Prototype

Changed in this revision

BME680OLED.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/BME680OLED.cpp	Sat May 08 08:54:27 2021 +0000
+++ b/BME680OLED.cpp	Mon May 10 08:58:06 2021 +0000
@@ -54,7 +54,7 @@
 int servoOutput_mus_S1 = 0;
 int servo_counter = 0;
 int servoMax = 580, servoMin = 350;                                             //2300: 180 ; 300: 0
-float a = -1.77, b = 757;                                                    //Gas -> Rotation
+float a = -2.3, b = 810;                                                    //Gas -> Rotation
 
 
 //Methodendeklaration
@@ -93,7 +93,7 @@
     mode_button.rise(&mode_button_rise);
     thread_sleep_for(1000);                                                     //Logo Anzeigen lassen
     pc.set_baud(9600);                                                          //baudrate
-    set_time(1619033310);                                                       // Set RTC time to Wed, 21. April 2021 19:28:30 https://www.epochconverter.com/
+    set_time(1620477341);                                                       // Set RTC time to Wed, 21. April 2021 19:28:30 https://www.epochconverter.com/
     thread_sleep_for(1000);
     oled.clearDisplay();
     if (!bme680.begin()) {                                                      //begin() startet Sensor: Vorheizen usw...
@@ -125,7 +125,7 @@
             oled.setTextCursor(0,15);
             
             //Werte auslesen
-            temp = bme680.getTemperature();
+            temp = bme680.getTemperature()-4.0;
             hum = bme680.getHumidity();
             press = static_cast<int>(bme680.getPressure()/100);
             voc = static_cast<int>(bme680.getGasResistance()/1000.0);
@@ -162,7 +162,7 @@
                         oled.printf("Temp:   %.1f %.1f C\r\n",minTemp, maxTemp);
                         oled.printf("Luftf.: %.1f %.1f %%\r\n",minHum, maxHum);
                         oled.printf("Luftd.: %d  %d hPa\r\n",minPress, maxPress);
-                        oled.printf("VOC:    %d %d kOhm\r\n",minVoc, maxVoc);
+                        oled.printf("VOC:    %d  %d kOhm\r\n",minVoc, maxVoc);
                         oled.display();
                     }else{
                         printf("Failed to perform reading :(\n");