change settings sensor7

This commit is contained in:
interfisch 2023-02-01 18:51:14 +01:00
parent 267a5652aa
commit 02c39822bc
3 changed files with 36 additions and 31 deletions

View File

@ -52,13 +52,17 @@ void Sensor_HTU21D::sensorloop()
}
void Sensor_HTU21D::loop_HTU21D_temperature()
{
sensordata &d=data_temperature;
bool _changed=false;
if (millis() >= (d.lastreadtime+d.readdelay)) {
Serial.println("Reading htu21d temperature");
d.value = htu->readTemperature();
Serial.println(d.value);
if (fabs(d.lastsentvalue-d.value)>=d.minchange){
_changed=true;
Serial.println("HTU temp changed");
}
d.lastreadtime=millis();
}

View File

@ -83,31 +83,6 @@ lib_deps =
#Test
[env:sensoresptest]
platform = espressif8266 @ 2.5.0
board = d1_mini
framework = arduino
monitor_port = /dev/ttyUSB0
monitor_speed = 115200
build_flags =
-D SENSOR_RADAR
-D SENSOR_RADAR_PIN=D5
-D SENSOR_RADAR_readdelay=100
-D SENSOR_RADAR_senddelaymax=1000*60*10
-D SENSOR_LDR
-D SENSOR_LDR_PIN=A0
-D SENSOR_LDR_CALIB_1
lib_deps =
ArduinoJson@6.16.1 #dependency of homie. using older version because of "ambiguous overload for operator|" error
Homie@3.0.0
#Arbeitszimmer
[env:sensoresp1]
@ -323,7 +298,7 @@ lib_deps =
Homie@3.0.0
claws/BH1750@1.1.4
#Kueche
#Badezimmer
[env:sensoresp7]
platform = espressif8266 @ 2.5.0
board = d1_mini
@ -343,9 +318,11 @@ build_flags =
-D SENSOR_VL53L1X_senddelaymax=1000*30
-D SENSOR_VL53L1X_readdelay=500
-D SENSOR_SHT31
-D SENSOR_SHT31_humidity_minchange=5
-D SENSOR_SHT31_temperature_minchange=0.5
-D SENSOR_HTU21D
-D dataHTU21D_temperature_minchange=0.2
-D dataHTU21D_temperature_senddelaymax=1000*60*30
-D dataHTU21D_humidity_minchange=1.0
-D dataHTU21D_humidity_senddelaymax=1000*60*30
lib_deps =
Bounce2
@ -353,7 +330,7 @@ lib_deps =
ArduinoJson@6.16.1
marvinroger/Homie @ ^3.0.1
pololu/VL53L1X @ ^1.3.0
adafruit/Adafruit SHT31 Library@^2.2.0
adafruit/Adafruit HTU21DF Library @ ^1.0.5
#3D Printer
[env:sensoresp3dprinter]
@ -379,3 +356,27 @@ lib_deps =
Homie@3.0.0
#Test
[env:sensoresptest]
platform = espressif8266 @ 2.5.0
board = d1_mini
framework = arduino
monitor_port = /dev/ttyUSB0
monitor_speed = 115200
build_flags =
-D SENSOR_HTU21D
-D dataHTU21D_temperature_minchange=0.2
-D dataHTU21D_temperature_senddelaymax=1000*60*30
-D dataHTU21D_humidity_minchange=1.0
-D dataHTU21D_humidity_senddelaymax=1000*60*30
lib_deps =
ArduinoJson@6.16.1 #dependency of homie. using older version because of "ambiguous overload for operator|" error
Homie@3.0.0
adafruit/Adafruit HTU21DF Library @ ^1.0.5

View File

@ -432,7 +432,7 @@ void setup() {
Serial.println();
Serial.println("Booting");
delay(1000); //wait for sensors to get powered
delay(5000); //wait for sensors to get powered
#ifdef SENSOR_DHT22