diff --git a/include/CO2.h b/include/CO2.h index 43b5c68..709e265 100644 --- a/include/CO2.h +++ b/include/CO2.h @@ -2,6 +2,8 @@ #include +#include + HardwareSerial Co2Port(1); // use UART2 // co2 Grenzwerte diff --git a/src/main.cpp b/src/main.cpp index 47ce8f6..80d0e07 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -21,8 +21,8 @@ #include -#define SDA 22 -#define SDL 21 +#define I2C_SDA 17 +#define I2C_SCL 2 // Pins for LED MATRIX @@ -78,7 +78,7 @@ Adafruit_HTU21DF htu = Adafruit_HTU21DF(); // This defines the 'on' time of the display is us. The larger this number, // the brighter the display. If too large the ESP will crash -uint8_t display_draw_time=10; //30-70 is usually fine +uint8_t display_draw_time = 35; //30-70 is usually fine //PxMATRIX display(32,16,P_LAT, P_OE,P_A,P_B,P_C); PxMATRIX display(64,32,P_LAT, P_OE,P_A,P_B,P_C,P_D); @@ -101,13 +101,6 @@ uint16_t myHimmelblau = display.color565(0, 191, 255); uint16_t myCOLORS[8]={myRED,myGREEN,myBLUE,myWHITE,myYELLOW,myCYAN,myMAGENTA,myBLACK}; -//------- Helligkeit des Display ------- -uint8_t dunkel = 25; -uint8_t hell = 255; -//---- Zeitsteuerung der Helligkeit ---- -u_int16_t StartderAbdunklung = 20; -u_int16_t EndederAbdunklung = 7; - // Wifi char ssid[] = "MagentaWLAN-RGDO"; // your network SSID (name) char pass[] = "93329248424922704583"; // your network password @@ -667,11 +660,12 @@ void Test() void setup() { startTime = millis(); Serial.begin(115200); + //Wire.begin(I2C_SDA, I2C_SCL); beginC02(); - if (!htu.begin()) { + if (!htu.begin()){ Serial.println("Couldn't find sensor!"); NOHTU = true; - delay(500); + delay(5000); } readHtu();