finalized code of LUTR v1

Dependencies:   PM2_Libary Adafruit_GFX BME680

Revision:
18:5019da899a41
Parent:
17:80e441d2b10a
Child:
19:4affd420bce6
--- a/main.cpp	Sun May 23 11:53:32 2021 +0000
+++ b/main.cpp	Tue May 25 07:50:24 2021 +0000
@@ -1,5 +1,5 @@
 /*
- *  Written by Juri Pfammatter 1/5/2021 for use in mbedOS
+ *  Written by Juri Pfammatter 25/5/2021 for use in mbedOS
  *
  *  Inspired by Neal Horman - http://www.wanlink.com
             and Adafruit - http://www.adafruit.com
@@ -51,7 +51,9 @@
 Servo servo_S1(PB_2);
 int servoPeriod_mus = 20000;                                                    //Zeitperiode
 int servoMax = 580, servoMin = 350;                                             //2300: 180 ; 300: 0
-float a = -2.3, b = 810;                                                        //Gas -> Rotation
+//float a = -2.3, b = 810;                                                      //Gas -> Rotation
+//Anpassung an defekten Sensor
+float a = -23, b = 695;
 float tempA = 0.8369, tempB = -0.6236;                                          //Temperaturkompensation
 
 
@@ -139,7 +141,7 @@
             
             /* Werte auslesen */
             if (bme680.performReading()) {                          
-                temp = tempA*bme680.getTemperature()+TempB;                     //Temperaturkompensation
+                temp = tempA*bme680.getTemperature()+tempB;                     //Temperaturkompensation
                 hum = bme680.getHumidity();
                 press = static_cast<int>(bme680.getPressure()/100);
                 voc = static_cast<int>(bme680.getGasResistance()/1000.0);