change settings sensor7
This commit is contained in:
parent
267a5652aa
commit
02c39822bc
|
@ -52,13 +52,17 @@ void Sensor_HTU21D::sensorloop()
|
||||||
}
|
}
|
||||||
void Sensor_HTU21D::loop_HTU21D_temperature()
|
void Sensor_HTU21D::loop_HTU21D_temperature()
|
||||||
{
|
{
|
||||||
|
|
||||||
sensordata &d=data_temperature;
|
sensordata &d=data_temperature;
|
||||||
bool _changed=false;
|
bool _changed=false;
|
||||||
|
|
||||||
if (millis() >= (d.lastreadtime+d.readdelay)) {
|
if (millis() >= (d.lastreadtime+d.readdelay)) {
|
||||||
|
Serial.println("Reading htu21d temperature");
|
||||||
d.value = htu->readTemperature();
|
d.value = htu->readTemperature();
|
||||||
|
Serial.println(d.value);
|
||||||
if (fabs(d.lastsentvalue-d.value)>=d.minchange){
|
if (fabs(d.lastsentvalue-d.value)>=d.minchange){
|
||||||
_changed=true;
|
_changed=true;
|
||||||
|
Serial.println("HTU temp changed");
|
||||||
}
|
}
|
||||||
d.lastreadtime=millis();
|
d.lastreadtime=millis();
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
#Arbeitszimmer
|
||||||
[env:sensoresp1]
|
[env:sensoresp1]
|
||||||
|
@ -323,7 +298,7 @@ lib_deps =
|
||||||
Homie@3.0.0
|
Homie@3.0.0
|
||||||
claws/BH1750@1.1.4
|
claws/BH1750@1.1.4
|
||||||
|
|
||||||
#Kueche
|
#Badezimmer
|
||||||
[env:sensoresp7]
|
[env:sensoresp7]
|
||||||
platform = espressif8266 @ 2.5.0
|
platform = espressif8266 @ 2.5.0
|
||||||
board = d1_mini
|
board = d1_mini
|
||||||
|
@ -343,9 +318,11 @@ build_flags =
|
||||||
-D SENSOR_VL53L1X_senddelaymax=1000*30
|
-D SENSOR_VL53L1X_senddelaymax=1000*30
|
||||||
-D SENSOR_VL53L1X_readdelay=500
|
-D SENSOR_VL53L1X_readdelay=500
|
||||||
|
|
||||||
-D SENSOR_SHT31
|
-D SENSOR_HTU21D
|
||||||
-D SENSOR_SHT31_humidity_minchange=5
|
-D dataHTU21D_temperature_minchange=0.2
|
||||||
-D SENSOR_SHT31_temperature_minchange=0.5
|
-D dataHTU21D_temperature_senddelaymax=1000*60*30
|
||||||
|
-D dataHTU21D_humidity_minchange=1.0
|
||||||
|
-D dataHTU21D_humidity_senddelaymax=1000*60*30
|
||||||
|
|
||||||
lib_deps =
|
lib_deps =
|
||||||
Bounce2
|
Bounce2
|
||||||
|
@ -353,7 +330,7 @@ lib_deps =
|
||||||
ArduinoJson@6.16.1
|
ArduinoJson@6.16.1
|
||||||
marvinroger/Homie @ ^3.0.1
|
marvinroger/Homie @ ^3.0.1
|
||||||
pololu/VL53L1X @ ^1.3.0
|
pololu/VL53L1X @ ^1.3.0
|
||||||
adafruit/Adafruit SHT31 Library@^2.2.0
|
adafruit/Adafruit HTU21DF Library @ ^1.0.5
|
||||||
|
|
||||||
#3D Printer
|
#3D Printer
|
||||||
[env:sensoresp3dprinter]
|
[env:sensoresp3dprinter]
|
||||||
|
@ -379,3 +356,27 @@ lib_deps =
|
||||||
Homie@3.0.0
|
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
|
|
@ -432,7 +432,7 @@ void setup() {
|
||||||
Serial.println();
|
Serial.println();
|
||||||
Serial.println("Booting");
|
Serial.println("Booting");
|
||||||
|
|
||||||
delay(1000); //wait for sensors to get powered
|
delay(5000); //wait for sensors to get powered
|
||||||
|
|
||||||
|
|
||||||
#ifdef SENSOR_DHT22
|
#ifdef SENSOR_DHT22
|
||||||
|
|
Loading…
Reference in New Issue