From 5807bd4e5faba151ddc6cf4d99e2ee2216aa7385 Mon Sep 17 00:00:00 2001 From: hans-jurgen Date: Fri, 15 Nov 2024 12:35:31 +0100 Subject: [PATCH] 2024-11-1500 --- include/mcp9808.h | 5 ++++- include/messADS1115.h | 1 + include/mess_BMP280.h | 2 +- include/mess_htu21.h | 3 ++- platformio.ini | 10 +++++----- 5 files changed, 13 insertions(+), 8 deletions(-) diff --git a/include/mcp9808.h b/include/mcp9808.h index 1486339..a94147a 100644 --- a/include/mcp9808.h +++ b/include/mcp9808.h @@ -54,7 +54,10 @@ float getTemperature_MCP9808(){ dtostrf(temperature,7,1,Temperature); Serial.print("Temperatur (MCP9808):\t"); Serial.print(Temperature); - Serial.println(" °C"); + Serial.print(" °C\t"); + Serial.println(temperature,4); + + tempsensor.shutdown_wake(1); // shutdown MSP9808 - power consumption ~0.1 mikro Ampere, stops temperature sampling return temperature; } diff --git a/include/messADS1115.h b/include/messADS1115.h index d469a04..27740c7 100644 --- a/include/messADS1115.h +++ b/include/messADS1115.h @@ -146,6 +146,7 @@ void MessungADS() { Serial.println(" V"); voltage = readChannel(ADS1115_COMP_1_GND); + voltage = voltage *2; dtostrf(voltage,8,2,ADSData.Solar); Serial.print("Solar:\t\t\t"); Serial.print(ADSData.Solar); diff --git a/include/mess_BMP280.h b/include/mess_BMP280.h index 291b2cd..92a0c1a 100644 --- a/include/mess_BMP280.h +++ b/include/mess_BMP280.h @@ -32,7 +32,7 @@ void Init_BMP280(){ F_BMP280 = false; SystemStatus = SystemStatus | BMP280noReady; Serial.print("SensorID was: 0x"); Serial.println(bmp.sensorID(),16); - delay(5000); + //delay(5000); } else{ /* Default settings from datasheet. */ bmp.setSampling(Adafruit_BMP280::MODE_NORMAL, /* Operating Mode. */ diff --git a/include/mess_htu21.h b/include/mess_htu21.h index 0eb5bbf..66fe0be 100644 --- a/include/mess_htu21.h +++ b/include/mess_htu21.h @@ -34,7 +34,8 @@ void read_HTU21D() { dtostrf(h,7,1,htuData.humity); Serial.print("Temperature (HTU21D):\t"); Serial.print(htuData.temperature); - Serial.println(" °C"); + Serial.print(" °C\t"); + Serial.println(t,4); Serial.print("Luftfeuchtigkeit:\t"); Serial.print(htuData.humity); Serial.println(" %"); diff --git a/platformio.ini b/platformio.ini index b7929e5..57f8059 100644 --- a/platformio.ini +++ b/platformio.ini @@ -39,7 +39,7 @@ build_flags = build_flags = ${env.build_flags} -DDEBUG=0 -DNOADS=0 - -DNAME=\"WETTERSTATIONMARCEL\" + -DNAME=\"WETTERSTATIONTEST\" -DSTASSID=\"MagentaWLAN-RGDO\" -DSTAPSK=\"93329248424922704583\" -DGATEWAY=\"192.168.127.1\" @@ -49,15 +49,15 @@ build_flags = ${env.build_flags} -Dmqtt_port=1883 -DTERROR=5 -DTLOWBATT=60 - -DTINTERVAL=10 + -DTINTERVAL=2 -DSpannungsteiler=3.9 -DUBKorectur=0.854417949 -DMinimalSpannung=3.00 -DKorrekturLuftdruck=23.58 - -DKorrekturTemperaturBME=0.1 - -DKorrekturTemperaturBMP=0.4 + -DKorrekturTemperaturBME=0.0 + -DKorrekturTemperaturBMP=0.0 -DKorrekturTemperaturMCP=0.0 - -DKorrekturTemperaturHTU=0.1 + -DKorrekturTemperaturHTU=-0.496 [env:marcel] ; Produktivsystem: build_flags = ${env.build_flags}